-
Notifications
You must be signed in to change notification settings - Fork 3
110 lines (86 loc) · 2.93 KB
/
Copy pathtests.yml
File metadata and controls
110 lines (86 loc) · 2.93 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Run Tests
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '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
# The CLI's operators run it on Windows — the observatory PC — and until
# now nothing here ever executed it there. No Docker on this runner; this
# covers the pure-Python paths: path handling, the console, the registry
# backend of the proxy's login item, and every Windows branch in the suite.
tests-windows:
runs-on: windows-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 dependencies
run: uv sync --extra webcam --group dev
- name: Test
run: uv run pytest -q tests/
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 (errors)
run: uv run flake8 arcsecond tests --count --select=E9,F63,F7,F82 --show-source --statistics
# Style and complexity, on the limits in .flake8. Blocking rather than
# advisory: the tree is clean, and the point of getting it there was to
# keep it there.
- name: Lint with flake8 (style and complexity)
run: uv run flake8 arcsecond tests --count --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