-
-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (44 loc) · 1.21 KB
/
check-formatting.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
name: Check formatting
on:
push:
paths:
- ".github/workflows/check-formatting.yml"
- "Taskfile.yml"
- ".prettierrc"
- "**.go"
- "**.json"
- "**.md"
- "**.yaml"
- "**.yml"
pull_request:
paths:
- ".github/workflows/check-formatting.yml"
- "Taskfile.yml"
- ".prettierrc"
- "**.go"
- "**.json"
- "**.md"
- "**.yaml"
- "**.yml"
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout local repository
uses: actions/checkout@v2
- name: Install Taskfile
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Check Go code formatting
run: task go:check-formatting
- name: Check shell script formatting
# https://github.com/mvdan/sh
run: |
docker run --volume "$GITHUB_WORKSPACE/libraries/spell-check":/mnt --workdir /mnt mvdan/shfmt:latest -w .
git diff --color --exit-code
- name: Check documentation formatting
run: task docs:check-formatting
- name: Check configuration file formatting
run: task config:check-formatting