-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (33 loc) · 932 Bytes
/
go.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
name: Go
on:
pull_request:
branches:
- '*'
permissions:
contents: read
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
checkpoint-api.hashicorp.com:443
github.com:443
objects.githubusercontent.com:443
proxy.golang.org:443
storage.googleapis.com:443
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: 1.19
- name: Check Code Generation
run: go generate ./... && git diff --exit-code
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...