-
Notifications
You must be signed in to change notification settings - Fork 358
37 lines (29 loc) · 1.03 KB
/
code_coverage.yml
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
name: "Code Coverage"
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11.3" ]
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-rye@v3
id: setup-rye
with:
cache-prefix: ${{ matrix.python-version }}
- name: Pin python-version ${{ matrix.python-version }}
run: rye pin ${{ matrix.python-version }}
- name: Install dependencies
if: steps.setup-rye.outputs.cache-hit != 'true'
run: rye sync --no-lock
- name: Activate Rye environment
run: echo "source $(rye env show)/bin/activate" >> $GITHUB_ENV
- name: Lint
run: rye lint -a
- name: Test
run: rye run pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./htmlcov/index.html