-
Notifications
You must be signed in to change notification settings - Fork 19
45 lines (38 loc) · 1.26 KB
/
continuous-integration-workflow.yaml
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
39
40
41
42
43
44
45
name: Automated tests & code coverage
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest]
steps:
- 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: |
python -m pip install --upgrade pip
pip install -e ".[develop]"
- uses: pre-commit/[email protected]
- name: Run tests
run: |
# -rA displays the captured output for all tests after they're run
# See the docs: https://doc.pytest.org/en/latest/reference/reference.html#command-line-flags
pytest -rA tests/
- name: Run coverage
if: matrix.os == 'ubuntu-latest'
run: |
pip install pytest pytest-cov
coverage run -m pytest tests/
- name: Ruff
uses: chartboost/ruff-action@v1
# - name: Upload coverage to coveralls
# if: matrix.os == 'ubuntu-latest'
# uses: coverallsapp/github-action@v2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}