-
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.
Add example of how using a composite action would work instead of a r…
…eusable workflow
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Molecule Test Collection | ||
description: Run `molecule test` on this Ansible Collection | ||
|
||
inputs: | ||
scenario: | ||
description: Name of the scenario to run the tests on | ||
required: false | ||
default: default | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Run `molecule test` | ||
uses: UCL-MIRSG/.github/actions/[email protected] | ||
with: | ||
scenario: ${{ inputs.scenario }} | ||
checkout_path: ansible_collections/mirsg/infrastructure | ||
tests_path: ansible_collections/mirsg/infrastructure/tests |
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,26 @@ | ||
name: Test firewalld | ||
on: | ||
pull_request: | ||
paths: | ||
- "roles/firewalld/**" | ||
- ".github/actions/molecule-test-collection/action.yml" | ||
- ".github/workflows/molecule-firewalld-with-action.yml" | ||
|
||
jobs: | ||
molecule: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
scenario: | ||
- centos7 | ||
env: | ||
MOLECULE_RUN_TAGS: firewalld | ||
PY_COLORS: 1 | ||
ANSIBLE_FORCE_COLOR: 1 | ||
|
||
steps: | ||
- name: Run `molecule test` | ||
uses: ./.github/actions/molecule-test-collection | ||
with: | ||
scenario: ${{ matrix.scenario }} |