-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.3 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Lint
on: push # yamllint disable-line rule:truthy
jobs:
main:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/.ansible
key: ansible-${{ hashFiles('requirements.yml') }}
- uses: mfinelli/setup-shfmt@v3
- run: pip3 install ansible ansible-lint
- run: npm install -g prettier
# - run: ansible-galaxy install -r requirements.yml
- name: Run shellcheck
run: |
shellcheck --version
shellcheck go vault wvault
find . -name '*.bash' | xargs shellcheck
find . -name '*.sh' | xargs shellcheck
- name: Run shfmt
run: |
shfmt --version
shfmt -s -i 2 -ci -sr -d go vault wvault
find . -name '*.bash' | xargs shfmt -s -i 2 -ci -sr -d
find . -name '*.sh' | xargs shfmt -s -i 2 -ci -sr -d
- name: Run prettier
run: |
prettier --version
find . -name '*.yaml' -o -name '*.yml' | xargs prettier -c
- name: Run yamllint
run: |
yamllint --version
find . -name '*.yaml' -o -name '*.yml' | xargs yamllint -f github
- name: Run ansible-lint
run: |
ansible-lint --version
ansible-lint dotfiles.yml