Skip to content

Commit

Permalink
update workflows and molecule configs
Browse files Browse the repository at this point in the history
  • Loading branch information
bodsch committed Aug 20, 2024
1 parent e6df4bd commit d6e9a82
Show file tree
Hide file tree
Showing 26 changed files with 271 additions and 287 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/icinga2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ on:
- "!README.md"
- 'roles/icinga2/**'
- '.github/workflows/icinga2.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

pull_request:
branches:
- 'main'
Expand All @@ -38,8 +37,6 @@ on:
- "!README.md"
- 'roles/icinga2/**'
- '.github/workflows/icinga2.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

env:
COLLECTION_NAMESPACE: bodsch
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/icingadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ on:
- "!README.md"
- 'roles/icingadb/**'
- '.github/workflows/icingadb.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

pull_request:
branches:
- 'main'
Expand All @@ -38,8 +37,6 @@ on:
- "!README.md"
- 'roles/icingadb/**'
- '.github/workflows/icingadb.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

env:
COLLECTION_NAMESPACE: bodsch
Expand All @@ -48,14 +45,14 @@ env:
ANSIBLE_FORCE_COLOR: '1'

jobs:
arch:
debian:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
- archlinux:latest
- debian:12
ansible-version:
- '8.5'
python_version:
Expand All @@ -69,8 +66,6 @@ jobs:
steps:
- name: check out the codebase.
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}

- name: 🐍 set up python
uses: actions/setup-python@v5
Expand All @@ -82,6 +77,15 @@ jobs:
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: force reinstall of community.docker
run: |
mkdir -p /home/runner/.ansible/collections
ansible-galaxy collection install community.docker --force
- name: teardown apparmor
run: |
if [ -e /usr/sbin/aa-teardown ]; then /usr/sbin/aa-teardown; fi
- name: Install collection
run: |
make \
Expand All @@ -95,19 +99,15 @@ jobs:
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}
debian:
ubuntu:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
- debian:12
- ubuntu:22.04
ansible-version:
- '8.5'
python_version:
Expand All @@ -132,6 +132,15 @@ jobs:
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: force reinstall of community.docker
run: |
mkdir -p /home/runner/.ansible/collections
ansible-galaxy collection install community.docker --force
- name: teardown apparmor
run: |
if [ -e /usr/sbin/aa-teardown ]; then /usr/sbin/aa-teardown; fi
- name: Install collection
run: |
make \
Expand All @@ -145,7 +154,3 @@ jobs:
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}
99 changes: 82 additions & 17 deletions .github/workflows/icingaweb2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ on:
- "!README.md"
- 'roles/icingaweb2/**'
- '.github/workflows/icingaweb2.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

pull_request:
branches:
- 'main'
Expand All @@ -38,8 +37,6 @@ on:
- "!README.md"
- 'roles/icingaweb2/**'
- '.github/workflows/icingaweb2.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

env:
COLLECTION_NAMESPACE: bodsch
Expand All @@ -48,14 +45,15 @@ env:
ANSIBLE_FORCE_COLOR: '1'

jobs:
arch:

debian:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
- archlinux:latest
- debian:12
ansible-version:
- '8.5'
python_version:
Expand All @@ -69,8 +67,61 @@ jobs:
steps:
- name: check out the codebase.
uses: actions/checkout@v4

- name: 🐍 set up python
uses: actions/setup-python@v5
with:
ref: ${{ github.event.workflow_run.head_branch }}
python-version: "${{ matrix.python_version }}"

- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: force reinstall of community.docker
run: |
mkdir -p /home/runner/.ansible/collections
ansible-galaxy collection install community.docker --force
- name: teardown apparmor
run: |
if [ -e /usr/sbin/aa-teardown ]; then /usr/sbin/aa-teardown; fi
- name: Install collection
run: |
make \
install
- name: test ${{ matrix.collection_role }} - ${{ matrix.scenario }}
run: |
make \
test \
-e TOX_ANSIBLE="ansible_${{ matrix.ansible-version }}" \
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
ubuntu:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
- ubuntu:22.04
ansible-version:
- '8.5'
python_version:
- "3.10"
- "3.11"
scenario:
- default
collection_role:
- icingaweb2

steps:
- name: check out the codebase.
uses: actions/checkout@v4

- name: 🐍 set up python
uses: actions/setup-python@v5
Expand All @@ -82,6 +133,15 @@ jobs:
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: force reinstall of community.docker
run: |
mkdir -p /home/runner/.ansible/collections
ansible-galaxy collection install community.docker --force
- name: teardown apparmor
run: |
if [ -e /usr/sbin/aa-teardown ]; then /usr/sbin/aa-teardown; fi
- name: Install collection
run: |
make \
Expand All @@ -95,14 +155,12 @@ jobs:
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}
debian:
scenarios:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-22.04
needs:
- debian
strategy:
fail-fast: false
matrix:
Expand All @@ -114,7 +172,9 @@ jobs:
- "3.10"
- "3.11"
scenario:
- default
- with-update
- with-icingadb
- update_2.7.0-2.11.3
collection_role:
- icingaweb2

Expand All @@ -132,6 +192,15 @@ jobs:
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: force reinstall of community.docker
run: |
mkdir -p /home/runner/.ansible/collections
ansible-galaxy collection install community.docker --force
- name: teardown apparmor
run: |
if [ -e /usr/sbin/aa-teardown ]; then /usr/sbin/aa-teardown; fi
- name: Install collection
run: |
make \
Expand All @@ -145,7 +214,3 @@ jobs:
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}
61 changes: 1 addition & 60 deletions .github/workflows/icingaweb2_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ on:
- "!README.md"
- 'roles/icingaweb2_modules/**'
- '.github/workflows/icingaweb2_modules.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

pull_request:
branches:
- 'main'
Expand All @@ -38,8 +37,6 @@ on:
- "!README.md"
- 'roles/icingaweb2_modules/**'
- '.github/workflows/icingaweb2_modules.yml'
- '.config/ansible-lint.yml'
- '.yamllint'

env:
COLLECTION_NAMESPACE: bodsch
Expand All @@ -48,58 +45,6 @@ env:
ANSIBLE_FORCE_COLOR: '1'

jobs:
arch:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
- archlinux:latest
ansible-version:
- '8.5'
python_version:
- "3.10"
- "3.11"
scenario:
- default
collection_role:
- icingaweb2_modules

steps:
- name: check out the codebase.
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}

- name: 🐍 set up python
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python_version }}"

- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-requirements.txt
- name: Install collection
run: |
make \
install
- name: test ${{ matrix.collection_role }} - ${{ matrix.scenario }}
run: |
make \
test \
-e TOX_ANSIBLE="ansible_${{ matrix.ansible-version }}" \
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}

debian:
name: "${{ matrix.image }} / ${{ matrix.scenario }} / ${{ matrix.ansible-version }} / ${{ matrix.python_version }}"
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -145,7 +90,3 @@ jobs:
-e DISTRIBUTION="${{ matrix.image }}" \
-e COLLECTION_ROLE="${{ matrix.collection_role }}" \
-e COLLECTION_SCENARIO="${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
DISTRIBUTION: ${{ matrix.image }}
Loading

0 comments on commit d6e9a82

Please sign in to comment.