Install cargo binstall #1129
This file contains hidden or 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: Run linters | |
| on: | |
| pull_request: | |
| types: [opened, reopened, ready_for_review, synchronize] | |
| push: | |
| branches: | |
| - "**" | |
| tags: | |
| - "!**" | |
| jobs: | |
| stylua: | |
| # This runs `stylua`: https://github.com/JohnnyMorganz/StyLua | |
| name: Stylua | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run Stylua | |
| uses: JohnnyMorganz/stylua-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| version: latest | |
| args: --check config/common/.config/nvim | |
| luals: | |
| # This runs `luals`: https://github.com/mrcjkb/lua-typecheck-action | |
| name: LuaLS | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run LuaLS | |
| uses: mrcjkb/lua-typecheck-action@v1 | |
| with: | |
| directories: | | |
| config/common/.config/nvim | |
| configpath: .luarc.json | |
| shellcheck: | |
| # This runs `shellcheck`: https://www.shellcheck.net | |
| name: Shell Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run ShellCheck | |
| run: | | |
| tmpfile="$(mktemp)" | |
| git ls-files -z | | |
| while IFS= read -r -d '' path; do | |
| case "$path" in | |
| config/common/.profile|config/common/.bashrc) | |
| printf '%s\0' "$path" >>"$tmpfile" | |
| continue | |
| ;; | |
| bin/*|install/*) | |
| ;; | |
| *) | |
| continue | |
| ;; | |
| esac | |
| case "$path" in | |
| *.bash|*.sh) | |
| printf '%s\0' "$path" >>"$tmpfile" | |
| continue | |
| ;; | |
| esac | |
| if [ -f "$path" ] && head -n 1 "$path" | grep -Eq '^#!.*\b(sh|bash)\b'; then | |
| printf '%s\0' "$path" >>"$tmpfile" | |
| fi | |
| done | |
| if [ -s "$tmpfile" ]; then | |
| count="$(tr -cd '\0' <"$tmpfile" | wc -c | tr -d ' ')" | |
| echo "Running ShellCheck on $count file(s)" | |
| xargs -0 shellcheck -S style -x -P SCRIPTDIR <"$tmpfile" | |
| else | |
| echo "No shell files selected for ShellCheck" | |
| fi | |
| rm -f "$tmpfile" | |
| shfmt: | |
| # This runs `shfmt`: https://github.com/mvdan/sh and `checkbashisms`: https://linux.die.net/man/1/checkbashisms | |
| name: Shell Formatter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run shfmt and checkbashisms | |
| uses: luizm/action-sh-checker@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SHFMT_OPTS: --simplify --indent 2 | |
| with: | |
| sh_checker_shellcheck_disable: true | |
| sh_checker_shfmt_disable: false | |
| sh_checker_checkbashisms_enable: true | |
| fish_indent: | |
| # This runs `fish_indent`: https://fishshell.com/docs/current/cmds/fish_indent.html | |
| name: Fish Indent | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run fish_indent | |
| uses: ddeville/fish-indent-action@master | |
| vint: | |
| # This runs `vint`: https://github.com/Vimjas/vint | |
| name: Vint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: vint | |
| uses: ddeville/vint-action@master |