-
-
Notifications
You must be signed in to change notification settings - Fork 25
42 lines (37 loc) · 1.06 KB
/
ci-check-repo.yaml
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
name: Check Formatting, Committers and Generated Code
on:
pull_request:
branches: [ main ]
concurrency:
group: ci-check-repo-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
verify:
name: Verify format
runs-on: ubuntu-22.04
outputs:
format: ${{ steps.should_format.outputs.format }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check all
id: should_format
run: |
./scripts/check_bats_fmt.sh
if ./scripts/check_fmt.sh ; then
echo "code is formatted"
else
echo "Please run scripts/format_repo.sh to format this pull request."
exit 1;
fi
./postgres/parser/build.sh
GOFLAGS="-mod=readonly" go build ./...
go vet -mod=readonly ./...
env:
BRANCH_NAME: ${{ github.head_ref }}
CHANGE_TARGET: ${{ github.base_ref }}