Skip to content

Commit

Permalink
chore(ci): fix test workflow to handle EOL pythons
Browse files Browse the repository at this point in the history
Also upgrade actions to latest versions.
  • Loading branch information
dairiki committed Sep 5, 2024
1 parent 73c4d3b commit 7b15721
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- {python: pypy2.7, tox3: true}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python }}
Expand All @@ -46,46 +46,49 @@ jobs:
- name: Test with tox
run: tox

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: coverage-data
name: coverage-data-${{ matrix.python }}
path: .coverage.*
include-hidden-files: true

test-py27:
name: Python 2.7
runs-on: ubuntu-latest
container: python:2.7-buster

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: python -m pip install --upgrade pip setuptools
- name: Install tox3
run: pip install 'tox<4' 'virtualenv<20.22.0'

- name: Test with tox
run: tox -e py27

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: coverage-data
name: coverage-data-2.7
path: .coverage.*
include-hidden-files: true

coverage:
needs: [tests, test-py27]
if: ${{ success() || failure() }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: coverage-data
pattern: coverage-data-*
merge-multiple: true
- run: python -m pip install tox
- run: tox -e cover-report

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: python -m pip install pre-commit tox
- run: pre-commit run -a
- run: tox r -e lint
Expand Down

0 comments on commit 7b15721

Please sign in to comment.