Use pre-commit hook to generate dist/codecov.sh #257
This file contains 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: Workflow for Codecov wrapper | |
on: # yamllint disable-line rule:truthy | |
- push | |
- pull_request | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip install -r app/requirements.txt | |
- name: Run tests and collect coverage | |
run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }} | |
- name: Upload coverage to Codecov | |
run: ./dist/codecov.sh | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
CODECOV_FAIL_ON_ERROR: true | |
CODECOV_FLAGS: flag1,flag2 |