homeserver/roles/pandemonium1986.ansible-role-k9s/.github/workflows/molecule.yml

66 lines
2 KiB
YAML
Raw Normal View History

---
name: "Molecule"
on:
schedule:
- cron: "0 21 * * *"
push:
branches:
- develop
pull_request:
types:
- main
- master
workflow_dispatch:
jobs:
lint:
name: "Ansible: Lint"
runs-on: ubuntu-latest
steps:
- name: "Init: Run checkout@v2"
uses: actions/checkout@v2
- name: "Ansible: Lint role"
uses: ansible/ansible-lint-action@master
with:
targets: "./"
molecule:
name: "Molecule: Test"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images:
- "centos7"
- "centos8"
- "debian9"
- "debian10"
- "debian11"
- "ubuntu1804"
- "ubuntu2004"
container:
image: ghcr.io/pandemonium1986/alpine313:nightly
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${{ github.workspace }}:/opt/workspace/${{ github.repository }}
env:
ANSIBLE_FORCE_COLOR: "1"
PY_COLORS: "1"
DKR_IMAGE: ${{ matrix.images }}
options: >-
--workdir /opt/workspace/${{ github.repository }}
needs:
- lint
steps:
- name: "Init: Run checkout@v2"
uses: actions/checkout@v2
- name: "Molecule: Create"
run: molecule create
- name: "Molecule: Converge"
run: molecule converge
- name: "Molecule: Idempotence"
run: molecule idempotence
- name: "Molecule: Verify"
run: molecule verify
- name: "Molecule: Destroy"
run: molecule destroy