Skip to content

Commit

Permalink
Update test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jan 7, 2023
1 parent c016b9f commit 7f23164
Showing 1 changed file with 24 additions and 44 deletions.
68 changes: 24 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,34 @@
name: Test
on: [push, pull_request]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10-dev]
max-parallel: 1
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12-dev"
fail-fast: false

steps:
- name: Print github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo $GITHUB_CONTEXT

- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: pycache
uses: actions/cache@v2
id: pycache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
if: "!endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}

- name: Setup python ${{ matrix.python-version }} (via deadsnakes)
uses: deadsnakes/action@v2.1.1
if: "endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}

- name: Install tox and test related
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
python -m pip install --upgrade tox
- name: Run tox
run: |
Expand All @@ -58,20 +42,16 @@ jobs:
env: [flake8, mypy]

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 1

- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: "3"

- name: Install tox and any other dependencies for test
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
python -m pip install --upgrade tox
- name: Run tox
run: tox -e ${{ matrix.env }}

0 comments on commit 7f23164

Please sign in to comment.