Update playbook.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Molecule tests | |
on: | |
push: | |
branches: | |
- main | |
paths_ignore: | |
- '*.md' | |
- '.ansible-lint' | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
paths_ignore: | |
- '*.md' | |
- '.ansible-lint' | |
jobs: | |
molecule: | |
runs-on: ubuntu-latest | |
env: | |
ANSIBLE_FORCE_COLOR: '1' | |
ANSIBLE_STDOUT_CALLBACK: yaml | |
CRUN_VER: 1.11.2 | |
REQUIREMENTS_FILE: molecule/ext/molecule-src/requirements.txt | |
GALAXY_REQUIREMENTS_FILE: molecule/ext/molecule-src/requirements.yml | |
MOLECULE_FILE: molecule/ext/molecule-src/molecule.yml | |
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 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- run: pip install -r ${{ env.REQUIREMENTS_FILE }} | |
- run: ansible-galaxy install -r ${{ env.GALAXY_REQUIREMENTS_FILE }} | |
- name: Molecule tests | |
run: | | |
molecule -vvv -c ${{ env.MOLECULE_FILE }} test --all |