Skip to content

Commit

Permalink
ci: upload coverage on release
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed May 8, 2024
1 parent 6d32221 commit def2e27
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,36 @@ jobs:
github-app-key: ${{ secrets.UGRC_RELEASE_BOT_APP_KEY }}
github-app-name: ${{ secrets.UGRC_RELEASE_BOT_NAME }}
github-app-email: ${{ secrets.UGRC_RELEASE_BOT_EMAIL }}

upload-coverage:
name: Upload coverage
runs-on: ubuntu-latest
needs: release-please
if: github.ref == 'refs/heads/main' && needs.release-please.outputs.release_created

steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false

- name: 🐍 Set up Python
uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: setup.py

- name: 🏗 Install module
run: pip install .[tests]

- name: ⚙️ Add config file
run: cp config.sample.json config.json

- name: 🧪 Run tests
run: pytest

- name: ⬆️ Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./cov.xml

0 comments on commit def2e27

Please sign in to comment.