Test running Molecule in the detected role folder
This commit is contained in:
40
.github/workflows/molecule.yml
vendored
40
.github/workflows/molecule.yml
vendored
@@ -45,6 +45,46 @@ jobs:
|
|||||||
|
|
||||||
console.log(matrix);
|
console.log(matrix);
|
||||||
|
|
||||||
|
|
||||||
|
molecule:
|
||||||
|
name: Run Molecule for changed roles
|
||||||
|
needs: detect
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
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
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: mamba-org/setup-micromamba@4d84239119b14cba1690b971f05c0bab912bea04
|
||||||
|
with:
|
||||||
|
micromamba-version: '2.4.0-0'
|
||||||
|
environment-file: ci/conda.yml
|
||||||
|
init-shell: bash
|
||||||
|
post-cleanup: 'all'
|
||||||
|
cache-environment: true
|
||||||
|
|
||||||
|
- name: "Install collection dependencies"
|
||||||
|
run: ansible-galaxy install -r requirements.yml
|
||||||
|
shell: micromamba-shell {0}
|
||||||
|
|
||||||
|
- name: "Run Molecule tests"
|
||||||
|
working-directory: ${{ matrix.role }}
|
||||||
|
run: molecule test
|
||||||
|
shell: micromamba-shell {0}
|
||||||
|
env:
|
||||||
|
PY_COLORS: '1'
|
||||||
|
ANSIBLE_FORCE_COLOR: '1'
|
||||||
|
# MOLECULE_DISTRO: ${{ matrix.distro }}
|
||||||
|
|
||||||
|
|
||||||
# molecule:
|
# molecule:
|
||||||
# name: molecule
|
# name: molecule
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user