Use YAML config for job conf #75
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 | |
pull_request: | |
branches: | |
- main | |
jobs: | |
molecule: | |
runs-on: ubuntu-latest | |
env: | |
ANSIBLE_FORCE_COLOR: '1' | |
ANSIBLE_STDOUT_CALLBACK: yaml | |
CRUN_VER: 1.11.2 | |
REQUIREMENTS_FILE: molecule/requirements.txt | |
BOOTSTRAP_KEY: foobar # defines an api bootstrap key for the molecule tests | |
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 }} | |
- name: Molecule tests | |
run: | | |
BOOTSTRAP_KEY=${{ env.BOOTSTRAP_KEY }} molecule -vvv test --all |