-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (50 loc) · 1.45 KB
/
lint-pytest.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
46
47
48
49
50
51
52
53
54
# SPDX-FileCopyrightText: Florian Maurer
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
jupyter:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Check reuse compliance
run: |
pip install reuse
reuse lint
- name: Install dependencies
run: |
pip install -e .
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
pip install ruff
ruff check .
ruff format .
- name: Test with pytest & integration tests
run: |
pip install pytest-asyncio pytest-cov
pytest
- name: Upload tests results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: |
coverage.xml
result.xml