-
Notifications
You must be signed in to change notification settings - Fork 13
87 lines (72 loc) · 1.98 KB
/
python.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
name: Build & Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9',
'3.11',
'3.12' ]
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Update cache
run: sudo apt-get update -qq
- name: Install system prerequisites
run: sudo apt-get install -yq
xsltproc
docbook-xsl
docbook-xml
zstd
systemd
systemd-container
debootstrap
- name: Upgrading pip
run: python -m pip install --upgrade pip
- name: Install dependencies
run: python -m pip install
setuptools
tomlkit
pkgconfig
flake8
pytest
pylint
mypy
isort
black
- name: Build & Install
run: |
./setup.py build
./setup.py install --root=/tmp
rm -rf build/
- name: Test
run: |
sudo $(which python3) -m pytest
rm -rf build/
- name: Lint (flake8)
run: |
python -m flake8 ./ --statistics
python -m flake8 debspawn/dsrun --statistics
- name: Lint (pylint)
run: |
python -m pylint -f colorized ./debspawn
python -m pylint -f colorized ./debspawn/dsrun
python -m pylint -f colorized ./tests ./data
python -m pylint -f colorized setup.py install-sysdata.py
- name: Lint (mypy)
run: |
python -m mypy --install-types --non-interactive .
python -m mypy ./debspawn/dsrun
- name: Lint (isort)
run: isort --diff .
- name: Lint (black)
run: black --diff .