From 7f231641f6f82acea31c1f2e13235f5f03675f18 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Sat, 7 Jan 2023 23:34:13 +0000 Subject: [PATCH] Update test matrix --- .github/workflows/test.yml | 68 ++++++++++++++------------------------ 1 file changed, 24 insertions(+), 44 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd2ebda..33cc884 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: | @@ -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 }}