From 0d7b2d756a20a7e5a7cd931ee4ebb0d6233799db Mon Sep 17 00:00:00 2001 From: Lucas Werkmeister Date: Sat, 15 Jul 2023 18:43:09 +0200 Subject: [PATCH] Remove matrix strategy from GitHub actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think the usefulness of this is limited: most tools can probably migrate from one Python version to another in a single commit, and replace the Python version in CI at the same time. Let’s simplify the setup for that common case. (Part of the motivation is that matrix runs are a bit more annoying to navigate on GitHub, even when there’s only one instance of them.) --- .github/workflows/test.yaml | 12 ++---------- .../.github/workflows/test.yaml | 6 +----- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d43da88..3ab461a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,15 +5,11 @@ on: jobs: test-defaults: runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - '3.11' steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: '3.11' - run: pip install --upgrade pip cookiecutter - run: | cd "${TMPDIR:-/tmp}" @@ -24,15 +20,11 @@ jobs: python example-tool/app.py test-all: runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - '3.11' steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: '3.11' - run: pip install --upgrade pip cookiecutter - run: | cd "${TMPDIR:-/tmp}" diff --git a/{{cookiecutter.tool_identifier}}/.github/workflows/test.yaml b/{{cookiecutter.tool_identifier}}/.github/workflows/test.yaml index 2d8f8b7..ed2d21d 100644 --- a/{{cookiecutter.tool_identifier}}/.github/workflows/test.yaml +++ b/{{cookiecutter.tool_identifier}}/.github/workflows/test.yaml @@ -5,15 +5,11 @@ on: jobs: test: runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - '3.11' steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: {% raw %}${{ matrix.python-version }}{% endraw %} + python-version: '3.11' - run: pip install --upgrade pip - run: pip install -r requirements.txt - run: make check