-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.28 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
43
44
45
46
47
48
49
50
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:
# Keep same version as used in *.nix
dprint-version: '0.39.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:
# Keep same version as used in *.nix
tool_versions: |
shellcheck 0.9.0
shfmt 3.7.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]