Skip to content

Commit 69d8e47

Browse files
rayketchamclaude
andcommitted
ci: use python3.12 explicitly — runner's python3 resolves to 3.9
The self-hosted runner's python3 points to 3.9.21 in the Actions environment despite the host having 3.12. Use python3.12 explicitly for all venv creation, lint, test, and build steps. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c549e52 commit 69d8e47

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1414
- name: Lint with ruff
15-
run: python3 -m ruff check src/ tests/
15+
run: python3.12 -m ruff check src/ tests/
1616
- name: Check formatting
17-
run: python3 -m ruff format --check src/ tests/
17+
run: python3.12 -m ruff format --check src/ tests/
1818

1919
test:
2020
runs-on: [self-hosted, Linux]
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2424
- name: Create venv and install
2525
run: |
26-
python3 -m venv .venv
26+
python3.12 -m venv .venv
2727
.venv/bin/pip install --upgrade pip
2828
.venv/bin/pip install -e ".[test]"
2929
- name: Run tests
@@ -36,15 +36,15 @@ jobs:
3636
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3737
- name: Build wheel and sdist
3838
run: |
39-
python3 -m venv .venv
39+
python3.12 -m venv .venv
4040
.venv/bin/pip install --upgrade pip
4141
.venv/bin/pip install build
4242
.venv/bin/python -m build --outdir dist/
4343
- name: Verify wheel contents
4444
run: |
4545
WHEEL=$(ls dist/*.whl)
4646
echo "Built: $WHEEL ($(stat -c%s "$WHEEL") bytes)"
47-
python3 -c "
47+
python3.12 -c "
4848
import zipfile, sys
4949
with zipfile.ZipFile('$WHEEL') as zf:
5050
names = zf.namelist()
@@ -58,7 +58,7 @@ jobs:
5858
"
5959
- name: Test install in fresh venv
6060
run: |
61-
python3 -m venv /tmp/forge-install-test
61+
python3.12 -m venv /tmp/forge-install-test
6262
/tmp/forge-install-test/bin/pip install dist/*.whl
6363
/tmp/forge-install-test/bin/python -c "import project_forge; print('OK:', project_forge.__file__)"
6464
test -f /tmp/forge-install-test/bin/forge-generate || { echo "FAIL: forge-generate missing"; exit 1; }
@@ -72,7 +72,7 @@ jobs:
7272
steps:
7373
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
7474
- name: Security lint
75-
run: python3 -m ruff check src/ --select S --ignore S101,S311,S314,S603,S607,S701
75+
run: python3.12 -m ruff check src/ --select S --ignore S101,S311,S314,S603,S607,S701
7676

7777
issue-test-ratio:
7878
runs-on: [self-hosted, Linux]
@@ -84,7 +84,7 @@ jobs:
8484
GH_REPO: rayketcham-lab/project-forge
8585
run: |
8686
ISSUE_COUNT=$(gh issue list -R "$GH_REPO" --state all --label feature --json number -q 'length' 2>/dev/null || echo 0)
87-
TEST_COUNT=$(python3 -m pytest tests/ --collect-only -q 2>/dev/null | tail -1 | grep -oP '\d+(?= test)' || echo 0)
87+
TEST_COUNT=$(python3.12 -m pytest tests/ --collect-only -q 2>/dev/null | tail -1 | grep -oP '\d+(?= test)' || echo 0)
8888
echo "Feature issues: $ISSUE_COUNT, Tests: $TEST_COUNT"
8989
if [ "$TEST_COUNT" -lt "$ISSUE_COUNT" ]; then
9090
echo "::warning::Test count ($TEST_COUNT) is below feature issue count ($ISSUE_COUNT)"

0 commit comments

Comments
 (0)