@@ -20,13 +20,27 @@ jobs:
2020 recursive : true
2121 ignore : DL3041
2222
23- python-lint :
23+ python-black :
24+ if : ${{ !github.event.act }} # skip during local actions testing
25+ name : python-black formatter
2426 runs-on : ubuntu-latest
27+ steps :
28+ - name : " CHECKOUT: nvme-stas"
29+ uses : actions/checkout@v4
30+
31+ - name : " BLACK"
32+ 33+ with :
34+ options : " --check --diff --color --line-length 120 --skip-string-normalization --extend-exclude (subprojects|debian|.build)"
35+ src : " ."
36+
37+ python-lint-Jammy :
38+ runs-on : ubuntu-22.04
2539
2640 strategy :
2741 fail-fast : false
2842 matrix :
29- python-version : ["3.9", "3.10", "3.11", "3.12", "3.13" ]
43+ python-version : ["3.9", "3.10"]
3044
3145 steps :
3246 - name : " CHECKOUT: nvme-stas"
@@ -41,11 +55,12 @@ jobs:
4155 run : |
4256 sudo apt update
4357 sudo apt-get install --yes --quiet meson ninja-build cmake libgirepository1.0-dev libsystemd-dev swig libjson-c-dev
44- sudo apt-get install --yes --quiet python3-wheel python3-systemd python3-pyudev python3-dasbus python3-gi python3-lxml pylint pyflakes3 python3-pyflakes python3-tomli
58+ sudo apt-get install --yes --quiet python3-wheel python3-systemd python3-pyudev python3-dasbus python3-gi python3-lxml pyflakes3 python3-tomli
4559
4660 - name : " INSTALL: pip packages"
4761 run : |
48- sudo pip install PyGObject --break-system-packages
62+ pip install pylint --upgrade
63+ pip install PyGObject --upgrade
4964
5065 - name : " BUILD: [libnvme, nvme-stas]"
5166@@ -64,27 +79,69 @@ jobs:
6479 python3 -VV
6580 python3 -m site
6681 pylint --version
67- echo "pyflakes $(python3 -m pyflakes --version)"
82+ echo "pyflakes3 $(pyflakes3 --version)"
6883
69- - name : Pylint
70- run : |
71- pylint -j 0 --rcfile=test/pylint.rc .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
84+ # - name: Pylint
85+ # run: |
86+ # pylint --rcfile=test/pylint.rc .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
7287
7388 - name : Pyflakes
7489 if : always()
7590 run : |
76- python3 -m pyflakes .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
91+ pyflakes3 .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
92+
93+ python-lint-Noble :
94+ runs-on : ubuntu-24.04
95+
96+ strategy :
97+ fail-fast : false
98+ matrix :
99+ python-version : ["3.11", "3.12", "3.13"]
77100
78- python-black :
79- if : ${{ !github.event.act }} # skip during local actions testing
80- name : python-black formatter
81- runs-on : ubuntu-latest
82101 steps :
83102 - name : " CHECKOUT: nvme-stas"
84103 uses : actions/checkout@v4
85104
86- - name : " BLACK "
87- 105+ - name : Set up Python ${{ matrix.python-version }}
106+ 88107 with :
89- options : " --check --diff --color --line-length 120 --skip-string-normalization --extend-exclude (subprojects|debian|.build)"
90- src : " ."
108+ python-version : ${{ matrix.python-version }}
109+
110+ - name : " INSTALL: apt-get packages"
111+ run : |
112+ sudo apt update
113+ sudo apt-get install --yes --quiet meson ninja-build cmake libgirepository1.0-dev libsystemd-dev swig libjson-c-dev
114+ sudo apt-get install --yes --quiet python3-wheel python3-systemd python3-pyudev python3-dasbus python3-gi python3-lxml pylint pyflakes3 python3-tomli
115+
116+ # - name: "INSTALL: pip packages"
117+ # run: |
118+ # pip install pylint
119+ # pip install PyGObject
120+
121+ - name : " BUILD: [libnvme, nvme-stas]"
122+ 123+ with :
124+ action : build
125+ directory : .build
126+ setup-options : --buildtype=release --sysconfdir=/etc --prefix=/usr -Dlibnvme:buildtype=release -Dlibnvme:sysconfdir=/etc -Dlibnvme:prefix=/usr -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled
127+
128+ - name : Set PYTHONPATH
129+ run : |
130+ echo "PYTHONPATH=.build:.build/subprojects/libnvme:/usr/lib/python3/dist-packages" >> $GITHUB_ENV
131+
132+ - name : Show test environment
133+ run : |
134+ echo -e "Build Directory:\n$(ls -laF .build)"
135+ python3 -VV
136+ python3 -m site
137+ pylint --version
138+ echo "pyflakes3 $(pyflakes3 --version)"
139+
140+ - name : Pylint
141+ run : |
142+ pylint --jobs=0 --rcfile=test/pylint.rc .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
143+
144+ - name : Pyflakes
145+ if : always()
146+ run : |
147+ pyflakes3 .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
0 commit comments