forked from codecov/example-python
-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (28 loc) · 891 Bytes
/
Copy pathci.yml
File metadata and controls
28 lines (28 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Workflow for Codecov example-python
on: [push]
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests and collect coverage
run: pytest --cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.1.0
with:
flags: unit,python${{ matrix.python-version }}
verbose: true
fail_ci_if_error: true
url: ${{ secrets.CODECOV_STAGING_URL }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_STAGING_TOKEN }}