-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
78 lines (67 loc) · 2.23 KB
/
Copy pathscripts-ci.yml
File metadata and controls
78 lines (67 loc) · 2.23 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Scripts CI
on:
push:
paths:
- "**/*.sh"
- "**/*.bats"
- ".github/scripts/**/*.js"
- ".github/workflows/scripts-ci.yml"
- "mise.toml"
jobs:
lint-shell:
name: Lint shell scripts
runs-on: ubuntu-slim
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- name: Use mise to install dependencies
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
with:
version: 2026.5.12
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: shellcheck
run: |
find . -name "*.sh" \
-not -path "./node_modules/*" \
-not -path "./docs/node_modules/*" \
-not -path "./.git/*" \
-print0 \
| xargs -0 mise x shellcheck -- shellcheck -x -P SCRIPTDIR
- name: shfmt
run: |
find . -name "*.sh" \
-not -path "./node_modules/*" \
-not -path "./docs/node_modules/*" \
-not -path "./.git/*" \
-print0 \
| xargs -0 mise x shfmt -- shfmt -d
test-shell:
name: Test shell scripts
runs-on: ubuntu-slim
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- name: Use mise to install dependencies
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
with:
version: 2026.5.12
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: bats
run: mise x bats -- bats --print-output-on-failure .github/scripts/release/tests/ .github/scripts/coverage/tests/ .github/scripts/security-scan/tests/
test-js:
name: Test JS scripts
runs-on: ubuntu-slim
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- name: Use mise to install dependencies
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
with:
version: 2026.5.12
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: bun test
working-directory: .github/scripts
run: mise x bun -- bun test