-
Notifications
You must be signed in to change notification settings - Fork 2
142 lines (142 loc) · 4.89 KB
/
ci.yml
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
139
140
141
142
# Run static analysis, tests, and sync
name: "ci"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: True
on:
workflow_dispatch:
pull_request:
push:
branches: ["main"]
defaults:
run:
shell: "pwsh"
jobs:
sync:
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "astral-sh/setup-uv@9f1f1fece28798fe5e7ece00f4243abe886974b2" # v3.0.0
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
**/uv.lock
.github/workflows/**
- run: "./Invoke-Uv.ps1"
- uses: "actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b" # v4.3.4
with:
name: "lock"
path: |
uv.lock
requirements
build-docs:
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "astral-sh/setup-uv@9f1f1fece28798fe5e7ece00f4243abe886974b2" # v3.0.0
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
**/uv.lock
.github/workflows/**
- run: "./Invoke-Uv.ps1 sphinx-build -EaT docs _site"
- uses: "actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa" # v3.0.1
deploy-docs:
if: github.event_name != 'pull_request'
needs: "build-docs"
permissions:
pages: "write"
id-token: "write"
environment:
name: "github-pages"
url: "${{ steps.deployment.outputs.page_url }}"
runs-on: "ubuntu-22.04"
steps:
- id: "deployment"
uses: "actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e" # v4.0.5
ruff:
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "astral-sh/setup-uv@9f1f1fece28798fe5e7ece00f4243abe886974b2" # v3.0.0
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
**/uv.lock
.github/workflows/**
- run: "./Invoke-Uv.ps1 ruff check --no-fix --output-format github ."
fawltydeps:
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "astral-sh/setup-uv@9f1f1fece28798fe5e7ece00f4243abe886974b2" # v3.0.0
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
**/uv.lock
.github/workflows/**
- run: ". ./dev.ps1 && iuv pre-commit run fawltydeps-src && iuv pre-commit run fawltydeps-dev"
pyright:
runs-on: "ubuntu-22.04"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "astral-sh/setup-uv@9f1f1fece28798fe5e7ece00f4243abe886974b2" # v3.0.0
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
**/uv.lock
.github/workflows/**
- run: "./Invoke-Uv.ps1"
- uses: "jakebailey/pyright-action@3bdde3b31d26f0f1f5de051b1fbd7a536a9a4e7f" # v2.3.1
with:
pylance-version: "${{ env.PYRIGHT_PYTHON_PYLANCE_VERSION }}"
test:
strategy:
matrix:
runner:
- "macos-13"
- "ubuntu-22.04"
- "windows-2022"
python:
- "3.11"
- "3.12"
runs-on: "${{ matrix.runner }}"
steps:
# ! https://askubuntu.com/questions/900285/libegl-so-1-is-not-a-symbolic-link
- if: startsWith(matrix.runner, 'ubuntu')
name: "Install PySide6 system dependencies"
run: "sudo apt update && sudo apt install libegl1-mesa-dev"
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "astral-sh/setup-uv@9f1f1fece28798fe5e7ece00f4243abe886974b2" # v3.0.0
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: |
**/uv.lock
.github/workflows/**
# ! https://github.com/pytest-dev/pytest-cov/issues/479#issuecomment-1247444988
- if: startsWith(matrix.runner, 'ubuntu') && matrix.python == '3.11'
run: "./Invoke-Uv.ps1 pytest --cov --cov-config=pyproject.toml --cov-report=xml"
- if: startsWith(matrix.runner, 'ubuntu') && matrix.python == '3.11'
uses: "codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673" # v4.5.0
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
- if: (!(startsWith(matrix.runner, 'ubuntu') && matrix.python == '3.11'))
run: "./Invoke-Uv.ps1 -PythonVersion '${{ matrix.python }}' pytest"