Fix an issue with job-level if evaluating before strategy
This commit is contained in:
10
.github/workflows/molecule.yml
vendored
10
.github/workflows/molecule.yml
vendored
@@ -54,16 +54,16 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.detect.outputs.matrix) }}
|
matrix: ${{ fromJson(needs.detect.outputs.matrix) }}
|
||||||
|
|
||||||
# Skip the job when only the sentinel is present
|
|
||||||
if: ${{ matrix.role != '__no_role__' }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the repo
|
- name: Checkout the repo
|
||||||
|
if: ${{ matrix.role != '__no_role__' }}
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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:
|
with:
|
||||||
micromamba-version: '2.4.0-0'
|
micromamba-version: '2.4.0-0'
|
||||||
environment-file: ci/conda.yml
|
environment-file: ci/conda.yml
|
||||||
@@ -72,10 +72,12 @@ jobs:
|
|||||||
cache-environment: true
|
cache-environment: true
|
||||||
|
|
||||||
- name: "Install collection dependencies"
|
- name: "Install collection dependencies"
|
||||||
|
if: ${{ matrix.role != '__no_role__' }}
|
||||||
run: ansible-galaxy install -r requirements.yml
|
run: ansible-galaxy install -r requirements.yml
|
||||||
shell: micromamba-shell {0}
|
shell: micromamba-shell {0}
|
||||||
|
|
||||||
- name: "Run Molecule tests"
|
- name: "Run Molecule tests"
|
||||||
|
if: ${{ matrix.role != '__no_role__' }}
|
||||||
working-directory: ${{ matrix.role }}
|
working-directory: ${{ matrix.role }}
|
||||||
run: molecule test
|
run: molecule test
|
||||||
shell: micromamba-shell {0}
|
shell: micromamba-shell {0}
|
||||||
|
|||||||
Reference in New Issue
Block a user