Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions day5/演習3/.github/workflow/test.yml
Original file line number Diff line number Diff line change
@@ -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