Add a linting workflow

This commit is contained in:
Alexander Gorelyshev
2025-12-04 13:50:54 +04:00
parent da27eccbc2
commit af7e4e7504
2 changed files with 50 additions and 0 deletions

41
.github/workflows/linters.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
---
name: linters
on:
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
jobs:
ansible-lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v5
- uses: mamba-org/setup-micromamba@7f29b8b80078b1b601dfa018b0f7425c587c63bb
with:
micromamba-version: '2.4.0-0'
environment-file: ci/conda.yml
init-shell: bash
post-cleanup: 'all'
# - name: "Install role dependencies"
# run: ansible-galaxy install -r requirements.yml
# shell: micromamba-shell {0}
- name: Check workflow files themselves with ActionLint
run: actionlint
shell: micromamba-shell {0}
- name: Check environment files with YAMLLint
run: yamllint ci/*.yml
shell: micromamba-shell {0}
- name: Run ansible-lint
run: ansible-lint -c .ansible-lint
shell: micromamba-shell {0}