-
Notifications
You must be signed in to change notification settings - Fork 13
57 lines (53 loc) · 1.68 KB
/
ci.yaml
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
name: "CI"
on: {push: {branches: ['**']}, pull_request: {branches: [dev, master]}}
jobs:
build:
name: ${{ matrix.os.name }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os.image }}
strategy:
matrix:
os:
- {image: ubuntu-latest, name: Linux}
- {image: windows-latest, name: Windows}
- {image: macos-latest, name: macOS}
python-version: [3.9, 3.10, 3.11]
exclude:
- os: {image: macos-latest, name: macOS}
python-version: 3.9
max-parallel: 4
fail-fast: false
steps:
- uses: "actions/checkout@main"
- uses: "actions/setup-python@main"
with:
python-version: ${{ matrix.python-version }}
- name: "Install dependencies"
run: |
python -mpip install --progress-bar=off nox
python --version
pip --version
nox --version
- name: "Run custom checks"
run: "python -m nox -s check"
env:
PLATFORM: ${{ matrix.os.image }}
- name: "Check with `black`"
run: "python -m nox -s black"
env:
PLATFORM: ${{ matrix.os.image }}
- name: "Check with `flake8`"
run: "python -m nox -s flake8"
env:
PLATFORM: ${{ matrix.os.image }}
- name: "Check with `isort`"
run: "python -m nox -s isort"
env:
PLATFORM: ${{ matrix.os.image }}
- name: "Build and check for packaging errors"
run: "python -m nox -s build"
env:
PLATFORM: ${{ matrix.os.image }}
- name: "Install the package"
run: "python -m nox -s install"
env:
PLATFORM: ${{ matrix.os.image }}