-
Notifications
You must be signed in to change notification settings - Fork 166
81 lines (65 loc) · 1.96 KB
/
continuous-integration-workflow.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
name: CI Workflow
on:
push:
pull_request:
branches:
- main
jobs:
Check:
timeout-minutes: 40
continue-on-error: ${{ matrix.optional || false }}
runs-on: ${{ matrix.os }}
name: >-
${{ matrix.nox-session || matrix.task }}
(${{ matrix.os }}, ${{ matrix.python-version }})
${{ matrix.optional && '[OPTIONAL]' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019]
python-version: ['3.9', '3.10', '3.11', '3.12']
nox-session: [test, example]
include:
- os: ubuntu-latest
python-version: ''
nox-session: ''
task: shellcheck
- os: ubuntu-latest
python-version: '3.8'
nox-session: flake8
- os: ubuntu-latest
python-version: '3.10'
nox-session: pylint
additional-sys-deps: libvirt-dev
- os: ubuntu-latest
python-version: '3.8'
nox-session: mypy
- os: ubuntu-latest
python-version: '3.8'
nox-session: docs
- os: ubuntu-latest
python-version: '3.8'
nox-session: coverage
env:
NOXSESSION: ${{ matrix.nox-session }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
if: matrix.python-version
- name: Install system dependencies
run: |
sudo apt update
sudo apt install libgirepository1.0-dev ${{ matrix.additional-sys-deps }}
if: startsWith(matrix.os, 'ubuntu')
- name: Install Nox
run: pip install nox toml
if: matrix.nox-session
- name: Run Nox
run: nox -v
if: matrix.nox-session
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@1.1.0
if: matrix.task == 'shellcheck'