-
Notifications
You must be signed in to change notification settings - Fork 1
138 lines (111 loc) · 4.11 KB
/
Copy pathquality.yml
File metadata and controls
138 lines (111 loc) · 4.11 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Quality
on:
push:
pull_request:
permissions:
contents: read
jobs:
docs:
name: Docs / Python 3.12
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv and Python
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
python-version: "3.12"
- name: Synchronize docs environment
run: uv sync --locked --no-default-groups --group docs
- name: Build docs
run: uv run --frozen --no-default-groups --group docs sphinx-build -W --keep-going -b html docs docs_html
native:
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
python-version:
- "3.12"
- "3.13"
- "3.14"
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv and Python
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: ${{ runner.os != 'Windows' }}
python-version: ${{ matrix.python-version }}
- name: Synchronize environment
run: uv sync --locked --no-default-groups --group wsl --extra gui
- name: Install Qt runtime libraries
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libegl1
- name: Ruff lint
run: uv run --frozen --no-default-groups --group wsl --extra gui ruff check .
- name: Ruff format check
run: uv run --frozen --no-default-groups --group wsl --extra gui ruff format --check .
- name: Maintainability budgets
run: uv run --frozen --no-default-groups --group wsl --extra gui python scripts/check_maintainability.py
- name: ty
run: uv run --frozen --no-default-groups --group wsl --extra gui ty check
- name: pytest
run: uv run --frozen --no-default-groups --group wsl --extra gui pytest
wsl:
name: WSL / Python ${{ matrix.python-version }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.12"
- "3.13"
- "3.14"
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install Ubuntu on WSL
uses: Vampire/setup-wsl@v7
with:
distribution: Ubuntu-24.04
additional-packages: curl ca-certificates
- name: Run quality checks in WSL
shell: wsl-bash {0}
run: |
cd "$(wslpath '${{ github.workspace }}')"
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
export UV_PYTHON="${{ matrix.python-version }}"
uv python install "$UV_PYTHON"
uv sync --locked --no-default-groups --group wsl --extra gui
uv run --frozen --no-default-groups --group wsl --extra gui ruff check .
uv run --frozen --no-default-groups --group wsl --extra gui ruff format --check .
uv run --frozen --no-default-groups --group wsl --extra gui python scripts/check_maintainability.py
uv run --frozen --no-default-groups --group wsl --extra gui ty check
uv run --frozen --no-default-groups --group wsl --extra gui pytest
installer:
name: Windows installer smoke
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv and Python
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: "3.12"
- name: Install Inno Setup
run: choco install innosetup --no-progress -y
- name: Build and test installer
shell: cmd
run: scripts\test-windows-installer.cmd
- name: Upload installer artifact
uses: actions/upload-artifact@v7
with:
name: matchpatch-installer-smoke
path: dist/installer/*.exe
if-no-files-found: error