-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce duplication in workflows by: - using our `molecule-test` GitHub Action - adding a reusable workflow for running the action - use this reusable workflow for running tests on the `provision` and `firewalld` roles (more workflows can be added in a separate pr) - run the tests for a given role when either the role itself changes or the workflow changes Note, this depends on UCL-MIRSG/.github#80 being merged first. And linting is broken will fix in a different pr
- Loading branch information
Showing
5 changed files
with
40 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Test with Molecule | ||
on: | ||
workflow_call: | ||
inputs: | ||
run-tags: | ||
type: string | ||
default: all | ||
|
||
jobs: | ||
molecule: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
scenario: | ||
- centos7 | ||
env: | ||
MOLECULE_RUN_TAGS: ${{ inputs.run-tags }} | ||
PY_COLORS: 1 | ||
ANSIBLE_FORCE_COLOR: 1 | ||
|
||
steps: | ||
- name: Run `molecule test` | ||
uses: UCL-MIRSG/.github/actions/[email protected] | ||
with: | ||
scenario: ${{ matrix.scenario }} | ||
checkout_path: ansible_collections/mirsg/infrastructure | ||
tests_path: ansible_collections/mirsg/infrastructure/tests |