-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 928 Bytes
/
ci.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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: shell-ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v4
- name: install shellcheck and shfmt
run: |
PATH="${PWD}/bin:${PATH}"
./scripts/install-shellcheck
echo "shellcheck path : $(which shellcheck)"
echo "shellcheck version: $(shellcheck --version)"
./scripts/install-shfmt
echo "shfmt path : $(which shfmt)"
echo "shfmt version: $(shfmt --version)"
- name: shellcheck
shell: bash
run: |
./.helpers/shellcheck
- name: shfmt
shell: bash
run: |
status=0
./.helpers/shfmt || status=1
./.helpers/git-check-dirty || status=1
exit "${status}"