Tag v2.1.0 #76
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: test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Run pre-commit hooks | |
uses: pre-commit/[email protected] | |
ansible-galaxy: | |
runs-on: ubuntu-22.04 | |
needs: pre-commit | |
steps: | |
- name: Checkout release | |
uses: actions/checkout@v4 | |
- name: Test Ansible Galaxy collection build | |
uses: artis3n/ansible_galaxy_collection@v2 | |
with: | |
api_key: ${{ secrets.ANSIBLE_GALAXY_API_KEY }} | |
publish: false | |
molecule: | |
runs-on: ubuntu-22.04 | |
needs: ansible-galaxy | |
strategy: | |
matrix: | |
scenario: | |
- default | |
- prometheus-exporter | |
- service-user-autogen-uid-gid | |
- service-user-explicit-uid-gid | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Setup Docker Compose | |
uses: KengoTODA/actions-setup-docker-compose@v1 | |
with: | |
version: "2.24.5" | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- name: Install Python packages used for testing | |
run: python -m pip install -r requirements.txt | |
env: | |
FORCE_COLOR: "1" | |
- name: Run Molecule tests | |
run: molecule test --scenario-name ${{ matrix.scenario }} | |
env: | |
ANSIBLE_FORCE_COLOR: "True" |