-
Notifications
You must be signed in to change notification settings - Fork 541
36 lines (30 loc) · 850 Bytes
/
lint.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
name: Lint
on: [push, pull_request]
jobs:
check-format:
runs-on: ubuntu-latest
env:
# We need jq +1.7 because of jqlang/jq#1741.
JQ_VERSION: '1.7'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Replace jq with specified version
run: |
wget -O jq "https://github.com/jqlang/jq/releases/download/jq-${{ env.JQ_VERSION }}/jq-linux-amd64"
chmod +x ./jq
JQ_PATH=$(which jq)
sudo mv jq $JQ_PATH
- name: Check jq version
run: |
jq --version
- name: Run make -C schema fmt
run: make -C schema fmt
- name: Check for changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "There are unformatted files."
exit 1
else
echo "All files are properly formatted."
fi