[Experiment] Replace a small shell script with go #428
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: Lint | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
dprint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dprint/[email protected] | |
with: | |
dprint-version: '0.36.1' | |
shellscript: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
# * ubuntu-latest includes shellcheck, However it is bit old. This ensures to use fixed version. | |
# * Standardizing to nix is best, but nix is slow even if installing only tiny binary | |
- uses: jdxcode/rtx-action@v1 | |
with: | |
tool_versions: | | |
shellcheck 0.9.0 | |
shfmt 3.6.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Logging dependency versions | |
run: | | |
shellcheck --version | |
shfmt --version | |
- name: Run linters | |
run: | | |
shopt -s globstar | |
shellcheck ./**/*.bash | |
shfmt --diff ./**/*.bash | |
typos: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Keep same version as used in *.nix | |
- uses: crate-ci/[email protected] |