-
Notifications
You must be signed in to change notification settings - Fork 31
63 lines (61 loc) · 1.61 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
name: Test build
on:
pull_request:
jobs:
docs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Vale
uses: pre-commit/[email protected]
with:
extra_args: --all-files vale
format:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Ruff format
uses: pre-commit/[email protected]
with:
extra_args: --all-files ruff-format
test:
strategy:
fail-fast: false
matrix:
python:
- "3.8" # oldest Python supported by PSF
- "3.9"
- "3.10"
- "3.11"
- "3.12" # newest stable Python
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with: {fetch-depth: 0} # deep clone for setuptools-scm
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Ruff
uses: pre-commit/[email protected]
with:
extra_args: --all-files ruff
- name: Mypy
uses: pre-commit/[email protected]
with:
extra_args: --all-files mypy
- name: Install requirements
run: |
pip3 install --upgrade pip
pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
- name: Build package
run: |
python3 setup.py sdist
- uses: actions/upload-artifact@v4
if: ${{ matrix.python == 3.12 }}
with:
name: python-package
path: dist/