Skip to content

Commit

Permalink
added workflow for ini tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mkayontour committed Jan 4, 2024
1 parent eb2ec17 commit 7367f3f
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/test_icingaweb2_ini_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Python Unittest
on:
push:
tags:
- '*'
branches:
- main
- 'feature/**'
- 'fix/**'
- '!doc/**'
paths:
- 'roles/icingaweb2/templates/**'
pull_request:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'

jobs:
icingaweb2_ini_template:
runs-on: ubuntu-latest

env:
COLLECTION_NAMESPACE: icinga
COLLECTION_NAME: icinga

strategy:
fail-fast: false
max-parallel: 1
matrix:
distro: [ubuntu2204]
python: ['3.9', '3.10']
ansible: ['2.13.10', '2.14.7']
scenario: [ini-configuration-tests]

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

- name: Set up Python
uses: actions/setup-python@v4
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 }}

0 comments on commit 7367f3f

Please sign in to comment.