Skip to content

Commit

Permalink
Minor cleanups in Tests workflow (#690)
Browse files Browse the repository at this point in the history
* πŸ‘· [github] Use consistent quoting in Tests workflow matrix

* πŸ‘· [github] Use Python 3.10 for coverage job

* πŸ‘· [github] Shorten `python-version` to `python` in Tests workflow matrix

Retrocookie-Original-Commit: https:/cjolowicz/cookiecutter-hypermodern-python-instance@5bcebbe

Co-authored-by: Thiago D'Ávila <[email protected]>
  • Loading branch information
cjolowicz and staticdev authored May 16, 2022
1 parent d000e67 commit cbcee6d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ on:

jobs:
tests:
name: ${{ matrix.session }} ${{ matrix.python-version }} / ${{ matrix.os }}
name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { python-version: "3.10", os: ubuntu-latest, session: "pre-commit" }
- { python-version: "3.10", os: ubuntu-latest, session: "safety" }
- { python-version: "3.10", os: ubuntu-latest, session: "mypy" }
- { python-version: 3.9, os: ubuntu-latest, session: "mypy" }
- { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
- { python-version: 3.7, os: ubuntu-latest, session: "mypy" }
- { python-version: "3.10", os: ubuntu-latest, session: "tests" }
- { python-version: 3.9, os: ubuntu-latest, session: "tests" }
- { python-version: 3.8, os: ubuntu-latest, session: "tests" }
- { python-version: 3.7, os: ubuntu-latest, session: "tests" }
- { python-version: "3.10", os: windows-latest, session: "tests" }
- { python-version: "3.10", os: macos-latest, session: "tests" }
- { python-version: "3.10", os: ubuntu-latest, session: "xdoctest" }
- { python-version: "3.10", os: ubuntu-latest, session: "docs-build" }
- { python: "3.10", os: "ubuntu-latest", session: "pre-commit" }
- { python: "3.10", os: "ubuntu-latest", session: "safety" }
- { python: "3.10", os: "ubuntu-latest", session: "mypy" }
- { python: "3.9", os: "ubuntu-latest", session: "mypy" }
- { python: "3.8", os: "ubuntu-latest", session: "mypy" }
- { python: "3.7", os: "ubuntu-latest", session: "mypy" }
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
- { python: "3.9", os: "ubuntu-latest", session: "tests" }
- { python: "3.8", os: "ubuntu-latest", session: "tests" }
- { python: "3.7", os: "ubuntu-latest", session: "tests" }
- { python: "3.10", os: "windows-latest", session: "tests" }
- { python: "3.10", os: "macos-latest", session: "tests" }
- { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
- { python: "3.10", os: "ubuntu-latest", session: "docs-build" }

env:
NOXSESSION: ${{ matrix.session }}
Expand All @@ -34,10 +34,10 @@ jobs:
- name: Check out the repository
uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}

- name: Upgrade pip
run: |
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Run Nox
run: |
nox --force-color --python=${{ matrix.python-version }}
nox --force-color --python=${{ matrix.python }}
- name: Upload coverage data
if: always() && matrix.session == 'tests'
Expand All @@ -107,10 +107,10 @@ jobs:
- name: Check out the repository
uses: actions/[email protected]

- name: Set up Python 3.9
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.9
python-version: "3.10"

- name: Upgrade pip
run: |
Expand Down

0 comments on commit cbcee6d

Please sign in to comment.