-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (61 loc) · 1.64 KB
/
sanity.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: 'Sanity Checks'
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
# markdownlint: https://github.com/markdownlint/markdownlint
mdl:
name: 'markdownlint'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: 'Checkout repository'
uses: actions/[email protected]
- name: "Install Ruby"
# v1.172.0
uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677
with:
ruby-version: '3.3'
bundler-cache: true
- name: 'Install mdl'
run: gem install mdl
- name: 'Run mdl'
run: |
set -euxo pipefail
cd ${{ github.workspace }}/
mdl --version
for f in $(find . \( -path ./.git -o -path ./bin -o -path ./.github \) -prune -o -type f -name "*.md" -print); do
mdl "$f"
done
shellcheck:
name: "shellcheck"
strategy:
fail-fast: false
# Run on Linux
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Install shellcheck on Ubuntu
run: |
sudo apt update
sudo apt install shellcheck -y
- name: Run shellcheck
run: |
set -euxo pipefail
cd ${{ github.workspace }}/
shellcheck --version
for f in $(find . \( -path ./.git -o -path ./bin \) -prune -o -type f -print); do
if file "$f" | grep "shell script" &>/dev/null; then
shellcheck -x "$f"
fi
done