From 9ef05302a71d6306b1b1dbcd9bf3aef530d74b19 Mon Sep 17 00:00:00 2001 From: Simon Torres Date: Wed, 24 Jul 2024 12:39:42 -0400 Subject: [PATCH] update actions matrix --- .github/workflows/python-package.yml | 38 ++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2a8881be..28288358 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -10,22 +10,40 @@ on: branches: [ main ] jobs: - build: - - runs-on: ubuntu-latest + tests: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + include: + + - name: Python 3.12 + os: ubuntu-latest + python: '3.12' + toxenv: py312-test + + - name: Python 3.10 + os: ubuntu-latest + python: '3.10' + toxenv: py310-test + + - name: Python 3.9 + os: ubuntu-latest + python: 3.9 + toxenv: py39-test steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python }} uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python }} - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --upgrade tox pip install flake8 pytest-cov wheel tox if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Compile DCR Binaries @@ -40,9 +58,9 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with tox + - name: Run Tests run: | - tox + tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} - uses: codecov/codecov-action@v4 with: