From 9183cbb33397cb1f91d7e57b083f99ddd6b3490a Mon Sep 17 00:00:00 2001 From: Nate Faerber Date: Tue, 2 May 2023 15:36:40 -0700 Subject: [PATCH] chore: add test matrix for supported Python versions --- .github/workflows/test.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e636ef..66f15d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,13 +13,17 @@ on: jobs: run-test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: - name: Check out repository - uses: actions/checkout@v2 - - name: Set up python - uses: actions/setup-python@v2 + uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -28,14 +32,16 @@ jobs: pip install -r requirements-dev.txt - name: Run tests run: | - scripts/test.sh + set -o pipefail + scripts/test.sh | tee ./pytest-coverage.txt - name: my-artifact - if: always() + if: always() && !env.ACT uses: actions/upload-artifact@v3 with: name: pytest-coverage path: pytest-coverage.txt - name: Pytest coverage comment + if: always() && !env.ACT uses: MishaKav/pytest-coverage-comment@main with: pytest-coverage-path: ./pytest-coverage.txt