-
Notifications
You must be signed in to change notification settings - Fork 0
175 lines (161 loc) · 4.87 KB
/
test.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Tests
permissions:
actions: read
contents: read
on:
push:
pull_request:
workflow_dispatch:
workflow_call:
env:
PYTHON_VERSION: "3.13"
jobs:
black_formatting:
name: Black Format Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: 'Nox: Python Black'
run: |
nox -s black_lint
pytest_all:
name: PyTest with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ matrix.python-version }}
- name: "Nox: Pytest ${{ matrix.python-version }}"
run: |
nox -s pytest-${{ matrix.python-version }}
semgrep_src:
name: Semgrep Security Scanning
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: 'Nox: Semgrep - src'
run: |
nox -s semgrep_src
mypy_all:
name: MyPy - All
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Nox: MyPy"
run: |
nox -s mypy
pyflakes_src:
name: Pyflakes - src
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Nox: Pyflakes - src"
run: |
nox -s pyflakes_src
pyflakes_examples:
name: Pyflakes - examples
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Nox: Pyflakes - examples"
run: |
nox -s pyflakes_examples
pyflakes_test:
name: Pyflakes - tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Nox: Pyflakes - tests"
run: |
nox -s pyflakes_tests
pylint_src:
name: Pylint - src
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Nox: Pylint - src"
run: |
nox -s pylint_src
pylint_examples:
name: Pylint - examples
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Nox: Pylint - examples"
run: |
nox -s pylint_examples
pylint_test:
name: Pylint - tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Nox: Pylint - tests"
run: |
nox -s pylint_tests
mkdocs_check:
# FIXME: Since there is no difference between "build" and "check" for the docs,
# this is redundant with the release workflow. Still, we want to provide
# the feedback about bad docs in the "test" workflow, upstream of release.
name: MkDocs - check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare common Python build environment
uses: ./.github/actions/python-build-env-setup
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: 'Nox: MKDocs Build'
run: |
nox -s mkdocs_build