Skip to content

Commit a433e45

Browse files
committed
ci: add pytest workflow with coverage
1 parent 963d584 commit a433e45

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/pytest.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pytest
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
9+
jobs:
10+
pytest:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.8", "3.9", "3.10"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
cache: 'pip'
24+
cache-dependency-path: setup.py
25+
26+
- name: Install dependencies
27+
run: |
28+
set -e
29+
pip install --upgrade pip
30+
pip install -e .[dev]
31+
32+
- name: Run tests with coverage
33+
run: |
34+
set -e
35+
python -m pytest --cov --cov-report=term-missing --cov-report=xml

0 commit comments

Comments
 (0)