Fix Python CI jobs: drop container, install Python 3.12 directly
python:3.12-slim has no Node, causing actions/checkout@v4's post-step to fail with 'exec: node not found'. Drop the container: declaration so jobs run on the ubuntu-latest runner (which has Node). Install Python 3.12 via deadsnakes PPA for the test job since the runner base image (Ubuntu 22.04) ships with Python 3.10. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -60,8 +60,6 @@ jobs:
|
||||
lint:
|
||||
name: Python lint
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: python:3.12-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -74,20 +72,25 @@ jobs:
|
||||
test:
|
||||
name: Python tests
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: python:3.12-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# git is required by setuptools-scm during package build
|
||||
- name: Install git
|
||||
run: apt-get update -qq && apt-get install -y -qq git
|
||||
# The act runner base image ships Ubuntu 22.04 with Python 3.10.
|
||||
# Our package requires 3.12, so install it from the deadsnakes PPA.
|
||||
- name: Install Python 3.12
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq software-properties-common
|
||||
add-apt-repository -y ppa:deadsnakes/ppa
|
||||
apt-get update -qq
|
||||
apt-get install -y -qq python3.12 python3.12-dev python3.12-venv python3-pip git
|
||||
python3.12 -m ensurepip --upgrade
|
||||
|
||||
- name: Install package with dev deps
|
||||
run: pip install -e ".[dev]"
|
||||
run: python3.12 -m pip install -e ".[dev]"
|
||||
|
||||
- name: Run tests
|
||||
run: pytest tests/ -v
|
||||
run: python3.12 -m pytest tests/ -v
|
||||
|
||||
build:
|
||||
name: Build & push image
|
||||
|
||||
Reference in New Issue
Block a user