From 6d038d4c3365d8eebc65bae3d5e7fb7d5c03dca9 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 18 Sep 2024 12:01:24 +0100 Subject: [PATCH] Upgrade coactions/dynamic-matrix to v3 --- .github/workflows/test.yml | 18 ++++++++++++++---- .github/workflows/tox.yml | 26 ++++++++++++++++---------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 544c37e..f0c86d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Determine matrix id: generate_matrix - uses: coactions/dynamic-matrix@v2 + uses: coactions/dynamic-matrix@v3 with: min_python: "3.12" max_python: "3.12" @@ -42,9 +42,19 @@ jobs: run: | python3 -m pip install 'tox>=4.0.0' - - name: Run tox -e ${{ matrix.passed_name }} - run: | - ${{ matrix.PREFIX }} tox -e ${{ matrix.passed_name }} + - run: ${{ matrix.command }} + + - run: ${{ matrix.command2 }} + if: ${{ matrix.command2 }} + + - run: ${{ matrix.command3 }} + if: ${{ matrix.command3 }} + + - run: ${{ matrix.command4 }} + if: ${{ matrix.command4 }} + + - run: ${{ matrix.command5 }} + if: ${{ matrix.command5 }} check: # This job does nothing and is only used for the branch protection if: always() diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index b17ca4e..bf98d86 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -43,7 +43,7 @@ jobs: steps: - name: Determine matrix id: generate_matrix - uses: coactions/dynamic-matrix@v2 + uses: coactions/dynamic-matrix@v3 with: min_python: ${{ inputs.min_python }} max_python: ${{ inputs.max_python }} @@ -76,11 +76,11 @@ jobs: - name: Set pre-commit cache uses: actions/cache@v4 - if: ${{ matrix.passed_name == 'lint' }} + if: ${{ matrix.name == 'lint' }} with: path: | ~/.cache/pre-commit - key: pre-commit-${{ matrix.name || matrix.passed_name }}-${{ hashFiles('.pre-commit-config.yaml') }} + key: pre-commit-${{ matrix.name }}-${{ hashFiles('.pre-commit-config.yaml') }} - name: Set up Python ${{ matrix.python_version || '3.12' }} if: "!contains(matrix.shell, 'wsl')" @@ -97,13 +97,19 @@ jobs: - name: Log installed dists run: python3 -m pip freeze --all - - name: Initialize tox envs ${{ matrix.passed_name }} - run: python3 -m tox --notest --skip-missing-interpreters false -vv -e ${{ matrix.passed_name }} - timeout-minutes: 5 # average is under 1, but macos can be over 3 + - run: ${{ matrix.command }} - # sequential run improves browsing experience (almost no speed impact) - - name: tox -e ${{ matrix.passed_name }} - run: python3 -m tox -e ${{ matrix.passed_name }} + - run: ${{ matrix.command2 }} + if: ${{ matrix.command2 }} + + - run: ${{ matrix.command3 }} + if: ${{ matrix.command3 }} + + - run: ${{ matrix.command4 }} + if: ${{ matrix.command4 }} + + - run: ${{ matrix.command5 }} + if: ${{ matrix.command5 }} - name: Archive logs and coverage data uses: actions/upload-artifact@v4 @@ -169,7 +175,7 @@ jobs: - name: Upload coverage data uses: codecov/codecov-action@v4 with: - name: ${{ matrix.passed_name }} + name: ${{ matrix.name }} fail_ci_if_error: true use_oidc: true