Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
ci(GITHUB): run all molecule scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Mar 10, 2023
1 parent fe3460b commit ceb7a69
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions {{cookiecutter.project_slug}}/.github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ jobs:
max-parallel: 4
matrix:
python-version: ${{ fromJson(needs._create_python_versions.outputs.python-versions) }}
scenario: ["docker1", "hostmachine1"]

steps:
- name: Molecule Test -- Checkout Repository
Expand Down Expand Up @@ -295,10 +296,26 @@ jobs:
cd role
source ./.github/scripts/poetry.sh "install-project"
- name: Molecule Test -- Run docker1 Scenario
- name: Molecule Test -- Reuse Cached Dependencies as Scenario
run: |
cd role
poetry run molecule test -s docker1
poetry run molecule dependency
mv ~/.cache/molecule/role/default ~/.cache/molecule/role/"${SCENARIO}"
env:
SCENARIO: ${{ matrix.scenario }}

- name: Molecule Test -- Run ${{ matrix.scenario }} Scenario
run: |
cd role
poetry run molecule test -s "${SCENARIO}"
env:
SCENARIO: ${{ matrix.scenario }}

- name: Molecule Test -- Reuse Scenario Dependencies as Cache
run: |
mv ~/.cache/molecule/role/"${SCENARIO}" ~/.cache/molecule/role/default
env:
SCENARIO: ${{ matrix.scenario }}

- name: Molecule Test -- Report Job Status (Success)
if: env.VERBOSE_NOTIFICATIONS == '1'
Expand Down

0 comments on commit ceb7a69

Please sign in to comment.