Fix CML action version to v2 #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: CI | |
| on: | |
| push: | |
| branches: [ master, dev ] | |
| pull_request: | |
| branches: [ master, dev ] | |
| 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 pandas pytest dvc[gcs] | |
| - name: Setup CML | |
| uses: iterative/setup-cml@v2 | |
| - name: Pull data from DVC | |
| run: dvc pull | |
| env: | |
| GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }} | |
| - name: Run tests | |
| run: pytest tests/ --maxfail=1 --disable-warnings -q | |
| - name: Create CML report | |
| env: | |
| REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| pytest tests/ --maxfail=1 --disable-warnings -q > report.txt | |
| cat report.txt >> report.md | |
| cml comment create report.md |