diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1bf4c7a..2975236 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,14 @@ jobs: # Smoke-tests that the published package itself -- no dev tooling -- still # installs and imports on the older Python versions that real CellProfiler # conda environments commonly run (e.g. CellProfiler 4.x on Python 3.8). + # Runs inside the official `python` Docker image rather than using + # actions/setup-python: GitHub's hosted Python builds for EOL versions like + # 3.8/3.9 aren't published for new runner OS images (there's no 3.8 or 3.9 + # build for ubuntu-26.04, for example), so setup-python breaks every time + # the ubuntu-latest image moves forward. Docker Hub keeps every + # `python:X.Y` image published indefinitely, independent of the runner OS. runs-on: ubuntu-latest + container: python:${{ matrix.python-version }} strategy: matrix: python-version: ["3.8", "3.9"] @@ -55,9 +62,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # full history + tags, so setuptools-scm sees the real version - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - name: Install the package (no dev dependencies) run: pip install . - name: Import sanity check @@ -69,16 +73,17 @@ jobs: # it catches anything missing from the built package (e.g. files only present # in the repo tree). Pinned to the commit under test: for a PR, that's the # PR's head commit, which GitHub exposes on the base repo even for forks. + # Runs inside the official `python` Docker image for the same reason as + # `compat` above -- actions/setup-python can't provide Python 3.8 on + # current runner images. runs-on: ubuntu-latest + container: python:${{ matrix.python-version }} strategy: matrix: python-version: ["3.8", "3.12"] env: INSTALL_URL: git+https://github.com/${{ github.repository }}.git@${{ github.event.pull_request.head.sha || github.sha }} steps: - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - name: Install from GitHub URL run: pip install "$INSTALL_URL" - name: Import sanity check (outside any source tree)