From 76d1c319d99515d61257debf1703abaad953fe5e Mon Sep 17 00:00:00 2001 From: SMasaya-code Date: Sun, 25 May 2025 16:03:27 +0900 Subject: [PATCH] Fix/test6 --- .../.github/workflow/test.yml" | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 "day5/\346\274\224\347\277\2223/.github/workflow/test.yml" diff --git "a/day5/\346\274\224\347\277\2223/.github/workflow/test.yml" "b/day5/\346\274\224\347\277\2223/.github/workflow/test.yml" new file mode 100644 index 000000000..812e8267e --- /dev/null +++ "b/day5/\346\274\224\347\277\2223/.github/workflow/test.yml" @@ -0,0 +1,41 @@ +name: ML Pipeline CI + +on: + # push: + # branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest great_expectations pandas scikit-learn flake8 black mypy pytest-cov + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Lint with flake8 + run: | + flake8 day5/演習3 --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 day5/演習3 --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics + + - name: Format check with black + run: | + black --check day5/演習3 + + - name: Run data tests + run: | + pytest day5/演習3/tests/test_data.py -v + + - name: Run model tests + run: | + pytest day5/演習3/tests/test_model.py -v \ No newline at end of file