-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (64 loc) · 1.98 KB
/
Copy pathtests.yml
File metadata and controls
82 lines (64 loc) · 1.98 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Run Tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: uv sync --extra webcam --group dev
- name: Test with coverage (only on 3.12)
if: matrix.python-version == '3.12'
run: uv run pytest -vvs tests/ --cov=arcsecond --cov-report=xml:coverage.xml
- name: Test without coverage
if: matrix.python-version != '3.12'
run: uv run pytest -vvs tests/
- name: Upload coverage artifact (only on 3.12)
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v6
with:
name: coverage
path: coverage.xml
scan:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v5
- name: Download coverage artifact
uses: actions/download-artifact@v5
with:
name: coverage
path: .
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: '3.12'
enable-cache: true
- name: Install dev dependencies
run: uv sync --group dev
- name: Lint with flake8
run: uv run flake8 arcsecond tests --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Check formatting with black
run: uv run black --check arcsecond tests
- name: Check imports with isort
run: uv run isort --check-only --profile black arcsecond tests