diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ca0ca1a..f8e910f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,26 +18,18 @@ jobs: os: ["ubuntu-latest", "windows-latest", "macos-latest"] exclude: - python-version: "2.7" - os: "windows-latest" - - python-version: "2.7" - os: "macos-latest" - - python-version: "2.7" - os: "ubuntu-latest" include: - python-version: "2.7" - os: "ubuntu-20.04" + os: "ubuntu-latest" + use-container: true env: TOXENV: py - + container: + image: ${{ matrix.use-container && format('python:{0}', matrix.python-version) || '' }} steps: - uses: actions/checkout@v5 - - if: ${{ matrix.python-version == '2.7' }} - run: | - sudo apt-get install python-is-python2 - curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py - python get-pip.py - - if: ${{ matrix.python-version != '2.7' }} - name: ${{ matrix.python-version }} - ${{ matrix.os }} + - if: ${{ !matrix.use-container }} + name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} (non-containers) uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }}