practice #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/practice3 --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 day5/practice3 --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics | |
| - name: Format check with black | |
| run: | | |
| black --check day5/practice3 | |
| - name: Run data tests | |
| run: | | |
| pytest day5/practice3/tests/test_data.py -v | |
| - name: Run model tests | |
| run: | | |
| pytest day5/practice3/tests/test_model.py -v |