diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c13daf..22e35f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,13 @@ --- name: CI -'on': +on: pull_request: push: branches: - master jobs: - - test: + molecule: name: Molecule # Workaround: systemd/kernel compatibility issue: # Failed to parse bus message: Invalid argument @@ -25,6 +24,7 @@ jobs: matrix: image: - 'rockylinux:8.8' + - 'rockylinux:9.3' scenario: - test1 - test1b @@ -75,22 +75,41 @@ jobs: ANSIBLE_FORCE_COLOR: '1' MOLECULE_IMAGE: ${{ matrix.image }} - runonce: - name: Checks - runs-on: ubuntu-20.04 + lint: + name: Lint + runs-on: ubuntu-22.04 + steps: + - name: Check out the codebase. + uses: actions/checkout@v3 + + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + + - name: Install lint dependencies + run: | + pip3 install -U ansible ansible-lint + + - name: Run Ansible lint + run: ansible-lint . + + filter-tests: + name: Filter tests + runs-on: ubuntu-22.04 steps: - name: Check out the codebase. uses: actions/checkout@v3 - name: Set up Python 3. - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.9' - name: Install test dependencies. run: | pip3 install -U ansible molecule[podman] yamllint ansible-lint - ansible-galaxy collection install containers.podman:>=1.10.1 # otherwise get https://github.com/containers/ansible-podman-collections/issues/428 + # ansible-galaxy collection install containers.podman:>=1.10.1 # otherwise get https://github.com/containers/ansible-podman-collections/issues/428 - name: Display ansible version run: ansible --version @@ -104,8 +123,5 @@ jobs: - name: Run Ansible syntax check run: ansible-playbook tests/test.yml -i tests/inventory --syntax-check - - name: Run Ansible lint - run: ansible-lint . - - name: Test custom filters run: ansible-playbook tests/filter.yml -i tests/inventory -i tests/inventory-mock-groups