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

42 lines
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:
2022-09-10 11:52:22 +00:00
schedule:
- cron: '0 23 * * *'
2021-02-18 23:11:19 +00:00
workflow_dispatch:
2022-09-10 11:52:22 +00:00
2021-02-18 23:11:19 +00:00
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 11:32:33 +00:00
- uses: actions/checkout@v3
2022-09-10 11:52:22 +00:00
- name: Generate Test Matrix
id: set-matrix
2022-09-10 08:27:16 +00:00
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 11:32:33 +00:00
- uses: actions/checkout@v3
2022-09-10 11:52:22 +00:00
- name: Molecule Test
2022-11-06 22:17:51 +00:00
uses: gofrolist/molecule-action@5d3b2497368889553ec8cbb2762ae577c33b3d89
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 11:32:33 +00:00
molecule_working_dir: ${{ matrix.role }}
2022-09-10 08:27:16 +00:00
env:
2022-09-10 11:32:33 +00:00
PY_COLORS: '1'
2022-09-10 08:27:16 +00:00
ANSIBLE_FORCE_COLOR: '1'