- Quote octal file mode values (0640, 0750 -> '0640', '0750') - Add 'Prepare' name to prepare.yml play - Fix truthy value in .gitea/workflows/test.yaml (on -> 'on') - Use role name 'bind9' instead of path in converge.yml - Move tags to top-level for Deploy and Validate Configuration block - Remove unnecessary comments to clean up code - Ensure all YAML and Ansible files pass ansible-lint production profile
59 lines
1.1 KiB
YAML
59 lines
1.1 KiB
YAML
---
|
|
name: Test
|
|
|
|
'on':
|
|
push:
|
|
branches:
|
|
- main
|
|
- feature/**
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install tools
|
|
run: |
|
|
pip install --no-cache-dir yamllint ansible-lint
|
|
|
|
- name: Run yamllint
|
|
run: yamllint -d relaxed .
|
|
|
|
- name: Run ansible-lint
|
|
run: ansible-lint --strict --profile=production
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
if: github.event_name == 'pull_request'
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install --no-cache-dir \
|
|
ansible \
|
|
molecule[podman] \
|
|
podman-compose \
|
|
pyyaml \
|
|
jinja2
|
|
|
|
- name: Run Molecule tests
|
|
run: molecule test
|