From f219acd041a9081ed604ebb4ef2e880c26fde954 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sat, 15 Apr 2023 10:56:44 +0200 Subject: [PATCH] ci: remove unimportant and complicated job filtering --- .github/workflows/integration-test.yaml | 78 +++++++------------------ 1 file changed, 21 insertions(+), 57 deletions(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index eb318a4..3cc8672 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -24,63 +24,7 @@ on: workflow_dispatch: jobs: - # This job is used as a workaround to a limitation when using a matrix of - # variations that a job should be executed against. The limitation is that a - # matrix once defined can't include any conditions. - # - # What this job does before our real test job with a matrix of variations run, - # is to decide on that matrix of variations a conditional logic of our choice. - # - # For more details, see this excellent stack overflow answer: - # https://stackoverflow.com/a/65434401/2220152 - # - decide-on-test-jobs-to-run: - name: Decide on test jobs to run - runs-on: ubuntu-latest - - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - - steps: - # Currently, this logic filters out a matrix entry equaling a specific git - # reference identified by "dont_run_on_ref". - - name: Decide on test jobs to run - id: set-matrix - run: | - matrix_post_filter=$( - echo "$matrix_include_pre_filter" \ - | yq e --output-format=json '.' - \ - | jq -c '{"include": map( . | select(.dont_run_on_ref != "${{ github.ref }}" ))}' - ) - echo "matrix=$matrix_post_filter" >> $GITHUB_OUTPUT - - echo "The subsequent job's matrix are:" - echo $matrix_post_filter | jq -C '.' - env: - matrix_include_pre_filter: | - - name: "Debian 11, Py 3.9" - distro_image: "debian:11" - runs_on: "ubuntu-22.04" - extra_flags: "" - - name: "Ubuntu 20.04, Py 3.8" - distro_image: "ubuntu:20.04" - extra_flags: "" - - name: "Ubuntu 22.04 Py 3.10" - distro_image: "ubuntu:22.04" - extra_flags: "" - - name: "Ubuntu 22.04, Py 3.10, from main" - distro_image: "ubuntu:22.04" - extra_flags: --upgrade-from=main - - name: "Ubuntu 22.04, Py 3.10, from latest" - distro_image: "ubuntu:22.04" - extra_flags: --upgrade-from=latest - - name: "Ubuntu 22.04, Py 3.10, from 0.2.0" - distro_image: "ubuntu:22.04" - extra_flags: --upgrade-from=0.2.0 - integration-tests: - needs: decide-on-test-jobs-to-run - # integration tests run in a container, # not in the worker, so this version is not relevant to the tests # and can be the same for all tested versions @@ -89,7 +33,27 @@ jobs: name: ${{ matrix.name }} strategy: fail-fast: false - matrix: ${{ fromJson(needs.decide-on-test-jobs-to-run.outputs.matrix) }} + matrix: + include: + - name: "Debian 11, Py 3.9" + distro_image: "debian:11" + runs_on: "ubuntu-22.04" + extra_flags: "" + - name: "Ubuntu 20.04, Py 3.8" + distro_image: "ubuntu:20.04" + extra_flags: "" + - name: "Ubuntu 22.04 Py 3.10" + distro_image: "ubuntu:22.04" + extra_flags: "" + - name: "Ubuntu 22.04, Py 3.10, from main" + distro_image: "ubuntu:22.04" + extra_flags: --upgrade-from=main + - name: "Ubuntu 22.04, Py 3.10, from latest" + distro_image: "ubuntu:22.04" + extra_flags: --upgrade-from=latest + - name: "Ubuntu 22.04, Py 3.10, from 0.2.0" + distro_image: "ubuntu:22.04" + extra_flags: --upgrade-from=0.2.0 steps: - uses: actions/checkout@v3