40 lines
990 B
YAML
40 lines
990 B
YAML
---
|
|
name: lint
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
shell-yaml-ansible:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install lint tools
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y shellcheck yamllint python3-pip
|
|
python3 -m pip install --user ansible-lint
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: ShellCheck Bash scripts
|
|
run: |
|
|
find infra-run/scripts/bash -name '*.sh' -print0 | xargs -0 shellcheck -x \
|
|
-P infra-run/scripts/bash/disk-full \
|
|
-P infra-run/scripts/bash/gpfs \
|
|
-P infra-run/scripts/bash/veritas
|
|
|
|
- name: Python syntax checks
|
|
run: bash scripts/check-python.sh
|
|
|
|
- name: yamllint
|
|
run: yamllint .
|
|
|
|
- name: ansible-lint
|
|
continue-on-error: true
|
|
run: cd infra-run/ansible && ansible-lint playbooks roles
|