Use codecov action v5 #7
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: tests | |
| on: | |
| pull_request: | |
| branches: | |
| - "main*" | |
| push: | |
| branches: | |
| - "main" | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv and sync dev dependencies | |
| run: | | |
| pip install uv | |
| uv venv | |
| echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV | |
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | |
| uv sync --dev | |
| - name: Run tests with pytest and collect coverage | |
| run: pytest --cov=pdfbaker --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |