Skip to content

Haproxy config validation; fix dashboard data display #49

Haproxy config validation; fix dashboard data display

Haproxy config validation; fix dashboard data display #49

Workflow file for this run

---
# CI for haidra.deployments collection
# Runs linting and integration tests on PRs and pushes to protected branches.
#
# Division of responsibility (see also: role-tests.yml):
# - test.yml (this file): Collection-level lint and safe Ansible syntax-check
# gates that run on every PR.
# - role-tests.yml: policy-contract enforcement, explicit render-only tests,
# daemon-backed runtime smoke tests, and manual live integration.
#
# Security model:
# - Lint and syntax-check jobs run on all triggers (no privileges needed).
# - The render-check job (PRs) performs Ansible --syntax-check only — no
# Docker containers, no --privileged execution.
# - Enable "Require approval for all outside collaborators" in repo
# Settings → Actions for defense-in-depth.
name: CI
on:
pull_request:
paths:
- "roles/**"
- "tests/**"
- "examples/**"
- "galaxy.yml"
- ".github/workflows/test.yml"
push:
branches: [main]
paths:
- "roles/**"
- "tests/**"
- "examples/**"
- "galaxy.yml"
- ".github/workflows/test.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint (YAML + Ansible)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install linters
run: pip install yamllint ansible-lint ansible
- name: yamllint
run: |
yamllint $(find roles/ -name '*.yml' -not -path 'roles/geerlingguy.*/*') \
tests/**/*.yml examples/
- name: ansible-lint
run: |
shopt -s globstar
ansible-lint roles/ tests/**/test_*.yml examples/
render-check:
name: Render check (PR)
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Ansible
run: pip install ansible
- name: Install collection dependencies
run: ansible-galaxy collection install -r requirements.yml --force
- name: Syntax check all test playbooks
env:
ANSIBLE_ROLES_PATH: ${{ github.workspace }}/roles
ANSIBLE_HOST_KEY_CHECKING: "False"
run: |
shopt -s globstar
for pb in tests/**/test_*.yml; do
echo "--- Syntax-checking $pb ---"
ansible-playbook --syntax-check "$pb" -i tests/inventory_docker.ini
done