Bump Ansible collections #1176
Workflow file for this run
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 CI/CD | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- "**" | |
schedule: | |
- cron: "0 0 1 * *" | |
workflow_dispatch: | |
jobs: | |
ansible-lint: | |
name: Ansible Lint | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out the codebase | |
uses: actions/checkout@v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install Ansible Lint | |
run: pip3 install -r .github/workflows/requirements/requirements_ansible_lint.txt | |
- name: Install Ansible collection dependencies | |
run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml | |
- name: Run Ansible Lint | |
run: ansible-lint --force-color | |
molecule: | |
name: Molecule | |
runs-on: ubuntu-22.04 | |
env: | |
NGINX_CRT: ${{ secrets.NGINX_CRT }} | |
NGINX_KEY: ${{ secrets.NGINX_KEY }} | |
strategy: | |
fail-fast: false | |
matrix: | |
scenario: | |
- default | |
- distribution | |
- downgrade | |
- downgrade-plus | |
- plus | |
- source | |
- source-version | |
- stable | |
- uninstall | |
- uninstall-plus | |
- upgrade | |
- upgrade-plus | |
- version | |
needs: ansible-lint | |
steps: | |
- name: Check out the codebase | |
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }} | |
uses: actions/checkout@v4 | |
# - name: Set up Docker QEMU | |
# if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }} | |
# uses: docker/setup-qemu-action@v2 | |
# with: | |
# platforms: aarch64,s390x | |
- name: Set up Python 3 | |
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install Molecule dependencies | |
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }} | |
run: pip3 install -r .github/workflows/requirements/requirements_molecule.txt | |
- name: Install Ansible core collection dependencies | |
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }} | |
run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml | |
- name: Run Molecule tests | |
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }} | |
run: molecule test -s ${{ matrix.scenario }} | |
env: | |
PY_COLORS: 1 | |
ANSIBLE_FORCE_COLOR: 1 |