Skip to content

Commit

Permalink
split up ini_template tests for each version. (#316)
Browse files Browse the repository at this point in the history
Cleanup old versions
  • Loading branch information
mkayontour authored Aug 1, 2024
1 parent e5b8f6e commit 9a0e874
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 13 deletions.
92 changes: 89 additions & 3 deletions .github/workflows/test_icingaweb2_ini_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- '!doc/**'

jobs:
test_ini_template:
test_ini_template_2_15:
runs-on: ubuntu-latest

env:
Expand All @@ -32,8 +32,94 @@ jobs:
max-parallel: 1
matrix:
distro: [ubuntu2204]
python: ['3.9', '3.10']
ansible: ['2.13.10', '2.14.7', '2.16.4']
python: ['3.9','3.10','3.11']
ansible: ['2.15']
scenario: [ini-configuration-tests]

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install dependencies ansible
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test-${{ matrix.ansible }}.txt
- name: Install collection
run: |
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
- name: Test with molecule
run: |
ansible --version
molecule --version
molecule test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}

test_ini_template_2_16:
runs-on: ubuntu-latest

env:
COLLECTION_NAMESPACE: icinga
COLLECTION_NAME: icinga

strategy:
fail-fast: false
max-parallel: 1
matrix:
distro: [ubuntu2204]
python: ['3.10','3.11','3.12']
ansible: ['2.16']
scenario: [ini-configuration-tests]

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install dependencies ansible
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test-${{ matrix.ansible }}.txt
- name: Install collection
run: |
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
- name: Test with molecule
run: |
ansible --version
molecule --version
molecule test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}

test_ini_template_2_17:
runs-on: ubuntu-latest

env:
COLLECTION_NAMESPACE: icinga
COLLECTION_NAME: icinga

strategy:
fail-fast: false
max-parallel: 1
matrix:
distro: [ubuntu2204]
python: ['3.10','3.11','3.12']
ansible: ['2.17']
scenario: [ini-configuration-tests]

steps:
Expand Down
4 changes: 2 additions & 2 deletions requirements-test-2.13.10.txt → requirements-test-2.15.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ansible-core==2.13.10
ansible-lint
ansible-core>=2.15,<2.16
molecule
ansible-lint
molecule-docker
pytest-testinfra
5 changes: 0 additions & 5 deletions requirements-test-2.16.4.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible-core==2.14.7
ansible-core>=2.16,<2.17
ansible-lint
molecule
molecule-docker
Expand Down
4 changes: 2 additions & 2 deletions requirements-test-2.16.2.txt → requirements-test-2.17.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ansible-core==2.16.2
ansible-lint
ansible-core>=2.17,<2.18
molecule
ansible-lint
molecule-docker
pytest-testinfra

0 comments on commit 9a0e874

Please sign in to comment.