Skip to content

Commit 3dc3563

Browse files
authored
Merge pull request #1169 from mulkieran/specify-python-version
Stop using LOWEST SUPPORTED ENVIRONMENT
2 parents bc5f723 + 2746f94 commit 3dc3563

File tree

1 file changed

+48
-39
lines changed

1 file changed

+48
-39
lines changed

.github/workflows/main.yml

Lines changed: 48 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,32 @@ jobs:
9191
strategy:
9292
matrix:
9393
include:
94-
- task: make -f Makefile all-tests
95-
rust_log: RUST_LOG=stratisd=debug
96-
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
97-
- task: make -f Makefile all-tests
98-
rust_log: RUST_LOG=stratisd=debug
99-
image: fedora:35 # LOWEST DEVELOPMENT ENVIRONMENT
94+
- python: "3.13" # CURRENT DEVELOPMENT PYTHON TOOLCHAIN
95+
- python: "3.9" # LOWEST SUPPORTED PYTHON TOOLCHAIN
10096
runs-on: ubuntu-latest
10197
container:
102-
image: ${{ matrix.image }}
98+
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
10399
# yamllint disable rule:line-length
104100
options: --privileged --userns=host --ipc=host -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro -v /usr/share/dbus-1:/usr/share/dbus-1
105101
steps:
102+
- uses: dtolnay/rust-toolchain@master
103+
with:
104+
components: cargo
105+
toolchain: 1.77.0 # LOWEST SUPPORTED RUST TOOLCHAIN
106+
- name: Install python prerequisites
107+
run: >
108+
dnf install -y
109+
alternatives
110+
python${{ matrix.python }}
111+
- name: Set python3 to python${{ matrix.python }}
112+
run: >
113+
alternatives
114+
--install /usr/bin/python3
115+
python3
116+
/usr/bin/python${{ matrix.python }}
117+
10
118+
- name: Display Python version
119+
run: python3 --version
106120
- uses: actions/checkout@v4
107121
with:
108122
path: stratis-cli
@@ -126,10 +140,6 @@ jobs:
126140
python3-psutil
127141
python3-wcwidth
128142
systemd-devel
129-
- uses: dtolnay/rust-toolchain@master
130-
with:
131-
components: cargo
132-
toolchain: 1.77.0 # LOWEST SUPPORTED RUST TOOLCHAIN
133143
- name: Check out stratisd
134144
uses: actions/checkout@v4
135145
with:
@@ -150,24 +160,18 @@ jobs:
150160
working-directory: stratisd
151161
- name: Run test
152162
run: >
153-
${{ matrix.rust_log }}
163+
RUST_LOG=stratisd=debug
154164
STRATISD=/usr/libexec/stratisd
155165
STRATIS_STRICT_POOL_FEATURES=1
156166
PYTHONPATH=./src
157-
${{ matrix.task }}
167+
make -f Makefile all-tests
158168
working-directory: stratis-cli
159169

160170
coverage-runs:
161171
needs: test-runs
162-
strategy:
163-
matrix:
164-
include:
165-
- task: make -f Makefile coverage-no-html
166-
rust_log:
167-
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
168172
runs-on: ubuntu-latest
169173
container:
170-
image: ${{ matrix.image }}
174+
image: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
171175
# yamllint disable rule:line-length
172176
options: --privileged --userns=host --ipc=host -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro -v /usr/share/dbus-1:/usr/share/dbus-1
173177
steps:
@@ -219,37 +223,42 @@ jobs:
219223
working-directory: stratisd
220224
- name: Run test
221225
run: >
222-
${{ matrix.rust_log }}
223226
STRATISD=/usr/libexec/stratisd
224227
STRATIS_STRICT_POOL_FEATURES=1
225228
PYTHONPATH=./src
226-
${{ matrix.task }}
229+
make -f Makefile coverage-no-html
227230
working-directory: stratis-cli
228231

229232
lowest-environment-checks:
230-
strategy:
231-
matrix:
232-
include:
233-
- dependencies: >
234-
python-setuptools
235-
python3-dbus-client-gen
236-
python3-dbus-python-client-gen
237-
python3-justbytes
238-
python3-dateutil
239-
python3-packaging
240-
python3-psutil
241-
python3-wcwidth
242-
task: make -f Makefile legacy-package
243233
runs-on: ubuntu-latest
244-
container: fedora:35 # LOWEST DEVELOPMENT ENVIRONMENT
234+
container: fedora:41 # CURRENT DEVELOPMENT ENVIRONMENT
245235
steps:
236+
- name: Install python3.9
237+
run: >
238+
dnf install -y
239+
alternatives
240+
python3.9
241+
- name: Set python3 to python3.9
242+
run: >
243+
alternatives
244+
--install /usr/bin/python3
245+
python3
246+
/usr/bin/python3.9
247+
10
246248
- name: Display Python version
247249
run: python3 --version
248250
- uses: actions/checkout@v4
249251
- name: Install dependencies
250252
run: >
251253
dnf install -y
252254
make
253-
${{ matrix.dependencies }}
254-
- name: ${{ matrix.task }}
255-
run: ${{ matrix.task }}
255+
python-setuptools
256+
python3-dbus-client-gen
257+
python3-dbus-python-client-gen
258+
python3-justbytes
259+
python3-dateutil
260+
python3-packaging
261+
python3-psutil
262+
python3-wcwidth
263+
- name: Make legacy package
264+
run: make -f Makefile legacy-package

0 commit comments

Comments
 (0)