diff --git a/.github/workflows/test_icingaweb2_ini_template.yml b/.github/workflows/test_icingaweb2_ini_template.yml index 91c4c226..578e4e47 100644 --- a/.github/workflows/test_icingaweb2_ini_template.yml +++ b/.github/workflows/test_icingaweb2_ini_template.yml @@ -20,7 +20,7 @@ on: - '!doc/**' jobs: - test_ini_template: + test_ini_template_2_15: runs-on: ubuntu-latest env: @@ -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: diff --git a/requirements-test-2.13.10.txt b/requirements-test-2.15.txt similarity index 68% rename from requirements-test-2.13.10.txt rename to requirements-test-2.15.txt index 5bf382de..e38e9026 100644 --- a/requirements-test-2.13.10.txt +++ b/requirements-test-2.15.txt @@ -1,5 +1,5 @@ -ansible-core==2.13.10 -ansible-lint +ansible-core>=2.15,<2.16 molecule +ansible-lint molecule-docker pytest-testinfra diff --git a/requirements-test-2.16.4.txt b/requirements-test-2.16.4.txt deleted file mode 100644 index 74ef23ff..00000000 --- a/requirements-test-2.16.4.txt +++ /dev/null @@ -1,5 +0,0 @@ -ansible-core==2.16.4 -molecule -ansible-lint -molecule-docker -pytest-testinfra diff --git a/requirements-test-2.14.7.txt b/requirements-test-2.16.txt similarity index 68% rename from requirements-test-2.14.7.txt rename to requirements-test-2.16.txt index 92b9cd43..92ce786c 100644 --- a/requirements-test-2.14.7.txt +++ b/requirements-test-2.16.txt @@ -1,4 +1,4 @@ -ansible-core==2.14.7 +ansible-core>=2.16,<2.17 ansible-lint molecule molecule-docker diff --git a/requirements-test-2.16.2.txt b/requirements-test-2.17.txt similarity index 68% rename from requirements-test-2.16.2.txt rename to requirements-test-2.17.txt index 9332828e..5c4c24ff 100644 --- a/requirements-test-2.16.2.txt +++ b/requirements-test-2.17.txt @@ -1,5 +1,5 @@ -ansible-core==2.16.2 -ansible-lint +ansible-core>=2.17,<2.18 molecule +ansible-lint molecule-docker pytest-testinfra