ansible-nas/.github/workflows/integration.yml

43 lines
1.1 KiB
YAML
Raw Normal View History

2021-02-21 19:50:07 +00:00
---
2021-02-18 23:14:00 +00:00
name: Integration
2021-02-18 23:11:19 +00:00
2021-02-21 19:50:07 +00:00
# Controls when the action will run.
2021-02-18 23:11:19 +00:00
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
2022-09-10 08:27:16 +00:00
generate-matrix:
name: Generate test matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
2021-02-18 23:11:19 +00:00
steps:
2022-09-10 08:27:16 +00:00
- uses: actions/checkout@v2
- id: set-matrix
shell: bash
run: "tests/github-test-matrix.sh"
2021-02-18 23:11:19 +00:00
2022-09-10 08:27:16 +00:00
test:
2022-09-10 08:34:11 +00:00
name: "Test ${{ matrix.role }}"
2022-09-10 08:27:16 +00:00
needs: generate-matrix
runs-on: ubuntu-latest
strategy:
matrix:
role: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
2022-09-10 08:34:11 +00:00
steps:
2022-09-10 09:54:48 +00:00
- name: Dump env context
id: env_context_step
2022-09-10 09:59:06 +00:00
run: env
2022-09-10 09:54:48 +00:00
- name: Dump GitHub context
id: github_context_step
run: echo '${{ toJSON(github) }}'
2022-09-10 08:27:16 +00:00
- name: Molecule
uses: gofrolist/molecule-action@v2
2021-02-18 23:11:19 +00:00
with:
2022-09-10 08:27:16 +00:00
molecule_options: --base-config ../../tests/molecule/base.yml
molecule_command: test
2022-09-10 09:32:58 +00:00
molecule_working_dir: /github/workspace/${{ matrix.role }}
2022-09-10 08:27:16 +00:00
env:
ANSIBLE_FORCE_COLOR: '1'