-
-
Notifications
You must be signed in to change notification settings - Fork 66
40 lines (34 loc) · 1.09 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
name: Lint
on:
push:
branches: [main]
pull_request:
jobs:
lint:
name: Lint source
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Setup shellcheck
run: >
wget https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz &&
tar -xvf shellcheck-v0.7.1.linux.x86_64.tar.xz &&
mv shellcheck-v0.7.1/shellcheck . &&
rm -rf shellcheck-v0.7.1 &&
chmod +x shellcheck &&
./shellcheck --version
- name: Run linter
run: deno task lint
- name: Run bash check
run: ./shellcheck --shell bash <(deno run -r ./examples/command/shell-completions.ts completions bash)
- name: Run zsh check
run: ./shellcheck --shell bash <(deno run -r ./examples/command/shell-completions.ts completions zsh)
- name: Type-check examples
run: deno task check:examples