-
Notifications
You must be signed in to change notification settings - Fork 18
29 lines (28 loc) · 947 Bytes
/
PR.yaml
File metadata and controls
29 lines (28 loc) · 947 Bytes
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
name: Pull Request Check
on:
pull_request:
branches: [develop, master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go v1.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- name: Check format
run: if [ -z $(gofmt -l .) ]; then echo 'Format check passed.'; else echo 'Format check failed. Please run gofmt by yourself before committing.'; exit 1; fi
- name: Build
env:
CGO_ENABLED: '0'
GOARCH: amd64
GOOS: linux
run: go build -ldflags "-X 'github.com/nextdotid/proof_server/common.Environment=development' -X 'github.com/nextdotid/proof_server/common.Revision=${{ github.sha }}' -X 'github.com/nextdotid/proof_server/common.BuildTime=$(date +%s)'" ./...
# - name: Test
# run: go test -v ./...