Skip to content

Commit 192fc5d

Browse files
[PATCH] Part 1 of many - possible fix for GHA cross-python testing (- WIP #79 -)
1 parent c08d48b commit 192fc5d

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/Tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,7 @@ jobs:
202202
if: ${{ !cancelled() && runner.os == 'Windows' }}
203203
run: python -m pip install --upgrade pip
204204
- name: Install dependencies for python ${{ matrix.python-version }} on ${{ matrix.os }}
205-
run: |
206-
pip install --upgrade "pip>=24.3.1" "setuptools>=45.0" "wheel>=0.37" ;
207-
pip install -r ./requirements.txt ;
208-
pip install -r ./test-requirements.txt || true ;
205+
run: make -f Makefile test-reqs ;
209206
- name: Pre-Clean
210207
id: clean
211208
run: make -j1 -f Makefile clean || true ;
@@ -241,10 +238,10 @@ jobs:
241238
run: |
242239
./cc-test-reporter after-build --exit-code 0 || true ;
243240
- name: deepsource for ${{ matrix.python-version }}
244-
if: ${{ runner.os }} == "Linux"
241+
if: ${{ !cancelled() && runner.os != 'Windows' }}
245242
shell: bash
246243
run: |
247-
if [ "$OS" == "ubuntu-latest" ] ; then ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml 2>/dev/null || true ; else echo "SKIP deepsource" ; fi ;
244+
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml 2>/dev/null || true ;
248245
- name: Post-Clean
249246
id: post
250247
run: make -j1 -f Makefile clean || true ;

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,12 @@ endif
7777

7878
# Python command configuration
7979
ifeq "$(PYTHON)" ""
80-
# Try to find python3, fallback to python
81-
PY_CMD=$(shell $(COMMAND) python3)
80+
ifneq "$(PYTHON_VERSION)" ""
81+
PY_CMD=$(shell $(COMMAND) python$(PYTHON_VERSION))
82+
else
83+
# Try to find python3, fallback to python
84+
PY_CMD=$(shell $(COMMAND) python3)
85+
endif
8286
ifneq "$(PY_CMD)" ""
8387
# Only use -B arg with python3
8488
PY_ARGS=-B

0 commit comments

Comments
 (0)