diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 7568908..9ea3b89 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -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