From db64b9f1140617bb431c551c36d113c2f1394ba6 Mon Sep 17 00:00:00 2001 From: Alexander Gorelyshev Date: Mon, 8 Dec 2025 11:12:01 +0400 Subject: [PATCH] Fix an issue with job-level `if` evaluating before `strategy` --- .github/workflows/molecule.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 640633c..66f6faa 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -54,16 +54,16 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.detect.outputs.matrix) }} - # Skip the job when only the sentinel is present - if: ${{ matrix.role != '__no_role__' }} - steps: - name: Checkout the repo + if: ${{ matrix.role != '__no_role__' }} uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: mamba-org/setup-micromamba@4d84239119b14cba1690b971f05c0bab912bea04 + - name: "Set up micromamba" + uses: mamba-org/setup-micromamba@4d84239119b14cba1690b971f05c0bab912bea04 + if: ${{ matrix.role != '__no_role__' }} with: micromamba-version: '2.4.0-0' environment-file: ci/conda.yml @@ -72,10 +72,12 @@ jobs: cache-environment: true - name: "Install collection dependencies" + if: ${{ matrix.role != '__no_role__' }} run: ansible-galaxy install -r requirements.yml shell: micromamba-shell {0} - name: "Run Molecule tests" + if: ${{ matrix.role != '__no_role__' }} working-directory: ${{ matrix.role }} run: molecule test shell: micromamba-shell {0}