diff --git a/.github/workflows/test-changes.yml b/.github/workflows/test-changes.yml index 11f5346d..3180b070 100644 --- a/.github/workflows/test-changes.yml +++ b/.github/workflows/test-changes.yml @@ -27,13 +27,15 @@ jobs: fail-fast: false matrix: os: [ "ubuntu-latest", "windows-latest", "macos-latest" ] - python: ['2.7', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] + python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] + include: + - python: '2.7' + os: "ubuntu-latest" runs-on: "${{ matrix.os }}" - env: testing: simple - + python_eol: no steps: - name: Determine what scope of testing is available on ${{ matrix.os }} if: | @@ -41,6 +43,12 @@ jobs: run: | echo 'testing=full' >> $GITHUB_ENV + - name: Determine if the python ${{ matrix.python }} is available on ${{ matrix.os }} + if: | + (matrix.python < '3.' ) || ( matrix.python == '3.6' && matrix.os == 'ubuntu-latest' ) + run: | + echo 'python_eol=yes' >> $GITHUB_ENV + - name: Checkout source code uses: actions/checkout@main @@ -51,10 +59,18 @@ jobs: sudo apt-get install -y --no-install-recommends python3-h5py - name: Set up Python ${{ matrix.python }} + if: env.python_eol == 'no' uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + - name: Set up Python ${{ matrix.python }} discontinued on ${{ matrix.os }} + if: env.python_eol == 'yes' + uses: MatteoH2O1999/setup-python@v1 + with: + python-version: ${{ matrix.python }} + cache: pip + - name: Install test dependencies run: | python -m pip install --upgrade pip