Skip to content

molecule test

molecule test #178

Workflow file for this run

name: molecule test
on:
push:
branches:
- develop
pull_request:
branches:
- master
- main
types: [opened, synchronize, reopened]
paths:
- 'defaults/**'
- 'handlers/**'
- 'molecule/**'
- 'tasks/**'
- 'templates/**'
- 'vars/**'
schedule:
- cron: '0 6 * * 0'
workflow_dispatch:
env:
MOLECULE_DOCKER_VOLUMES: rw
MOLECULE_DOCKER_CGROUPS_MODE: host
jobs:
repo:
name: Test GHA Runner Role
environment:
name: test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 5
matrix:
config:
- os: "debian11"
- os: "fedora39"
- os: "ubuntu20"
- os: "ubuntu22"
- os: "rockylinux9"
steps:
- name: checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install test dependencies
run: |
pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" jmespath
- name: Run Molecule test - repo
run: molecule test --scenario-name repo
working-directory: "${{ github.repository }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_IMAGE: ${{ matrix.config.os }}
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_ACCOUNT: monolithprojects-testorg
GITHUB_REPO: ansible-github_actions_runner-testrepo
org:
name: Test Org Runner
needs: repo
environment:
name: test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 5
matrix:
config:
- os: "debian11"
- os: "fedora37"
- os: "ubuntu20"
- os: "ubuntu22"
- os: "rockylinux9"
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install test dependencies
run: pip3 install ansible docker molecule molecule-plugins[docker] "requests<2.29.2" jmespath
- name: Run Molecule tests -
run: molecule test --scenario-name org
working-directory: "${{ github.repository }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_IMAGE: ${{ matrix.config.os }}
MOLECULE_DOCKER_CGROUPS_MODE: ${{ matrix.config.cgroup_mode }}
MOLECULE_DOCKER_VOLUMES: ${{ matrix.config.volumes }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_ACCOUNT: monolithprojects-testorg
GITHUB_REPO: ansible-github_actions_runner-testrepo