Skip to content

Biweekly molecule run for playbooks #18

Biweekly molecule run for playbooks

Biweekly molecule run for playbooks #18

Workflow file for this run

---
name: Biweekly molecule run for playbooks
on:
schedule:
- cron: '22 2 * * 3' # 2:22am on Monday
workflow_dispatch:
jobs:
molecule:
runs-on: ubuntu-latest
env:
DOCKER_USER: ${{ github.actor }}
DOCKER_PW: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REGISTRY: ghcr.io
ANSIBLE_FORCE_COLOR: '1'
ANSIBLE_STDOUT_CALLBACK: yaml
MOLECULE_CONFIG: molecule/ext/molecule-src/molecule.yml
REQUIREMENTS_FILE: molecule/ext/molecule-src/requirements.txt
ANSIBLE_REQUIREMENTS_FILE: molecule/ext/molecule-src/requirements.yml
CRUN_VER: 1.11.2
steps:
- name: Workaround crun issue on ubuntu
run: |
mkdir -p "${HOME}/.local/bin"
curl -L "https://github.com/containers/crun/releases/download/${CRUN_VER}/crun-${CRUN_VER}-linux-amd64" -o "${HOME}/.local/bin/crun"
chmod +x "${HOME}/.local/bin/crun"
crun --version
mkdir -p "${HOME}/.config/containers"
cat << EOF > "${HOME}/.config/containers/containers.conf"
[engine.runtimes]
crun = [
"${HOME}/.local/bin/crun",
"/usr/bin/crun"
]
EOF
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install -r ${{ env.REQUIREMENTS_FILE }}
- run: ansible-galaxy install -r ${{ env.ANSIBLE_REQUIREMENTS_FILE }}
- run: ansible-galaxy install -r requirements.yml
- name: Molecule tests
run: |
molecule -c ${{ env.MOLECULE_CONFIG }} test --all