-
-
Notifications
You must be signed in to change notification settings - Fork 182
49 lines (38 loc) · 1.65 KB
/
checks.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
name: Run Checks
on:
push:
branches:
- main
pull_request:
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
- name: Shell script static analysis
run: shellcheck bin/fetch-configlet bin/verify-unity-version bin/check-unitybegin bin/run-tests format.sh
- name: Check concept exercises formatting
run: |
find exercises/concept/ -path '*/test-framework' -prune -o \
\( -iname '*.h' -o -iname '*.c' \) -print0 |\
xargs --null clang-format --dry-run --Werror
- name: Check practice exercises formatting
run: |
find exercises/practice/ -path '*/test-framework' -prune -o \
\( -iname '*.h' -o -iname '*.c' \) -print0 |\
xargs --null clang-format --dry-run --Werror
- name: Check Unity version
run: ./bin/verify-unity-version ./exercises/concept ./exercises/practice
- name: Check unitybegin()
run: ./bin/check-unitybegin ./exercises/concept ./exercises/practice
- name: Check include guards
run: ./bin/check-include-guards ./exercises/concept ./exercises/practice
- name: Check links
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621
id: lychee
with:
args: --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" --no-progress **/*.md **/*.html
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Fail if there were link errors
run: exit ${{ steps.lychee.outputs.exit_code }}