enforce formatting with shfmt #124
Workflow file for this run
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: prepare | |
on: | |
push: | |
branches: [master] | |
tags-ignore: ['v*'] | |
pull_request: | |
branches: [master] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
check-latest: true | |
- name: Install shfmt | |
run: go install mvdan.cc/sh/v3/cmd/shfmt@latest | |
- name: Install shellcheck | |
run: sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y shellcheck | |
- name: Run tests with BATS | |
run: ./test/bats/bin/bats test/*.bats | |
- name: Run shellcheck | |
run: find ./bin -type f -print -exec shellcheck {} + | |
- name: Run shfmt | |
run: shfmt -d . |