-
Notifications
You must be signed in to change notification settings - Fork 21
38 lines (34 loc) · 1.13 KB
/
code-cover.yml
File metadata and controls
38 lines (34 loc) · 1.13 KB
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
29
30
31
32
33
34
35
36
37
38
# This workflow is purely to determine code coverage.
# Since we really only need to run coverage once (not N times for every combination
# in a test matrix), there is some duplication with the primary testing workflow.
name: Code Coverage
on: [push, pull_request]
env:
python-version: 3.9
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install pytest-cov
python -m pip install multidict
- name: Install pvl
run: python -m pip install -e .
- name: Test with pytest and generate coverage report
run: pytest --cov=./pvl --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}