From d4c4bb1cf19af78ce9c0af0d35c7d12e9379d62b Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Sun, 15 Sep 2024 22:47:29 +0200 Subject: [PATCH] ci: do not use matrix inside reusable workflow --- .gitea/workflows/e2e-tests-vault.yml | 9 +++++++-- .gitea/workflows/e2e-tests.yml | 14 +++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/e2e-tests-vault.yml b/.gitea/workflows/e2e-tests-vault.yml index 0f4fe79..4d42779 100644 --- a/.gitea/workflows/e2e-tests-vault.yml +++ b/.gitea/workflows/e2e-tests-vault.yml @@ -13,8 +13,13 @@ on: jobs: end_to_end_vault: + strategy: + matrix: + test_os: ["vault_default", "vault_with_raft_enabled"] + scenario: + ["debian11", "debian12", "ubuntu2004", "ubuntu2204", "ubuntu2404"] uses: ./.gitea/workflows/e2e-tests.yml with: role: vault - scenarios: "['vault_default', 'vault_with_raft_enabled']" - test_os: "['debian11', 'debian12', 'ubuntu2004', 'ubuntu2204', 'ubuntu2404']" + scenario: ${{ matrix.scenario}} + test_os: ${{ matrix.test_os }} diff --git a/.gitea/workflows/e2e-tests.yml b/.gitea/workflows/e2e-tests.yml index bfd3dcb..7492f71 100644 --- a/.gitea/workflows/e2e-tests.yml +++ b/.gitea/workflows/e2e-tests.yml @@ -8,14 +8,14 @@ on: required: true type: string description: "Which role should be tested" - scenarios: + scenario: required: true type: string - description: "Which scenarios should be run (stringified list)" + description: "Which scenarios should be run" test_os: required: true type: string - description: "On which OS to run the tests (stringified list)" + description: "On which OS to run the tests" jobs: retrieve-credentials: @@ -45,10 +45,6 @@ jobs: credentials: username: ${{needs.retrieve-credentials.outputs.registry-username}} password: ${{needs.retrieve-credentials.outputs.registry-token}} - strategy: - matrix: - test_os: ${{ fromJSON(inputs.test_os) }} - scenario: ${{ fromJSON(inputs.scenarios) }} env: ANSIBLE_HOST_KEY_CHECKING: "false" ANSIBLE_FORCE_COLOR: "true" @@ -58,8 +54,8 @@ jobs: uses: actions/checkout@v3 - name: "Molecule test" - run: molecule test -s ${{ matrix.scenario }} + run: molecule test -s ${{ inputs.scenario }} shell: bash working-directory: ${{ gitea.workspace }}/roles/${{ inputs.role }} env: - MOLECULE_TEST_OS: ${{ matrix.test_os }} + MOLECULE_TEST_OS: ${{ inputs.test_os }}