Skip to content

Release 3.1.0

Release 3.1.0 #533

Workflow file for this run

# README:
# Resources:
# - Template for this file: https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml
env:
NAMESPACE: checkmk
COLLECTION_NAME: general
name: Ansible Linting
on:
workflow_dispatch:
push:
branches:
- main
- devel
paths:
- 'roles/**'
pull_request:
branches:
- main
- devel
paths:
- 'roles/**'
jobs:
integration:
runs-on: ubuntu-latest
name: I py${{ matrix.python }})
strategy:
fail-fast: false
matrix:
python:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
steps:
- name: Check out code
uses: actions/checkout@v3
with:
path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Install Checkmk collection
run: ansible-galaxy collection install ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
# Run the linting
- name: Run yamllint on roles
run: yamllint -c .yamllint roles/
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Run yamllint on playbooks
run: yamllint -c .yamllint playbooks/
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Run ansible-lint on roles
run: ansible-lint -c ${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/.ansible-lint ${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/roles/
working-directory: ./ansible_collections/
env:
ANSIBLE_LIBRARY: "./${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/plugins/modules"
ANSIBLE_ROLES_PATH: "./${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/roles"
- name: Run ansible-lint on playbooks
run: ansible-lint -c ${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/.ansible-lint ${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/playbooks/
working-directory: ./ansible_collections/
env:
ANSIBLE_LIBRARY: "./${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/plugins/modules"
ANSIBLE_ROLES_PATH: "./${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}/roles"