Skip to content

Commit e59ea52

Browse files
committed
For Github Action CI, pass action's Python 3 in test call
The prior patch worked in my local environment, but missed a nuance of Python 3.8 being available in Github's runner, though 3.6 is the action's configured version. The Makefile PYTHON3 variable does a newest-version-first search, so virtualenv wasn't found at runtime. The name of the action's Python 3 command was found via the home page of the setup-python action: https://github.com/marketplace/actions/setup-python Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 02e37ac commit e59ea52

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
- name: Start from clean state
3939
run: make clean
4040
- name: Run tests
41-
run: make check
41+
run: make PYTHON3=python check

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
SHELL := /bin/bash
1515

16+
PYTHON3 ?= $(shell which python3.9 2>/dev/null || which python3.8 2>/dev/null || which python3.7 2>/dev/null || which python3.6 2>/dev/null || which python3)
17+
1618
all:
1719

1820
.PHONY: \
@@ -38,6 +40,7 @@ all:
3840
check: \
3941
.git_submodule_init.done.log
4042
$(MAKE) \
43+
PYTHON3=$(PYTHON3) \
4144
--directory tests \
4245
check
4346

0 commit comments

Comments
 (0)