Commit 9a08129 1 parent 5d5d921 commit 9a08129 Copy full SHA for 9a08129
File tree 1 file changed +36
-0
lines changed
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Code Formatting
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ check-format :
7
+ runs-on : ubuntu-latest
8
+ env :
9
+ # We need jq +1.7 because of jqlang/jq#1741.
10
+ JQ_VERSION : ' 1.7'
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Replace jq with specified version
17
+ run : |
18
+ wget -O jq "https://github.com/jqlang/jq/releases/download/jq-${{ env.JQ_VERSION }}/jq-linux-amd64"
19
+ chmod +x ./jq
20
+ JQ_PATH=$(which jq)
21
+ sudo mv jq $JQ_PATH
22
+ - name : Check jq version
23
+ run : |
24
+ jq --version
25
+
26
+ - name : Run make fmt
27
+ run : make -C schema fmt
28
+
29
+ - name : Check for changes
30
+ run : |
31
+ if [[ -n $(git status --porcelain) ]]; then
32
+ echo "There are unformatted files."
33
+ exit 1
34
+ else
35
+ echo "All files are properly formatted."
36
+ fi
You can’t perform that action at this time.
0 commit comments