Created
April 19, 2024 12:36
-
-
Save r-leyshon/74b78bcbe60ad5cb8743d94e7299dc63 to your computer and use it in GitHub Desktop.
Breaking changes to codecov-action means CODECOV_TOKEN needs to be set on open repos.
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: API workflow | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: macos-latest | |
name: Test python API | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Set up Python 3.12.1 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.1' | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run tests and collect coverage | |
run: | | |
coverage run -m pytest | |
coverage xml | |
- uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true # optional (default = false) | |
files: ./coverage.xml # optional | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
token: ${{ secrets.CODECOV_TOKEN }} # required | |
verbose: true # optional (default = false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment