-
Notifications
You must be signed in to change notification settings - Fork 42
53 lines (43 loc) · 1008 Bytes
/
api-server.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
53
name: api-server
on:
push:
branches:
- main
- release-1.0
pull_request:
branches:
- main
- release-1.0
jobs:
fmt-build-test:
runs-on: ubuntu-latest
env:
CGO_ENABLED: 1
defaults:
run:
working-directory: api-server
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.6'
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config
- name: Install Go Dependencies
run: |
go mod download
- name: Go Format
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "The following files are not formatted properly:"
echo "$unformatted"
exit 1
fi
- name: Build
run: |
go build ./...