Add homebrew ruby to the path if it exists #353
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |