-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (47 loc) · 1.24 KB
/
push-acceptance.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
name: build-acceptance
on:
pull_request:
types: [opened, synchronize]
paths: ['acceptance/**']
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Install Tools
run: go install gotest.tools/gotestsum@latest
- name: Test
working-directory: acceptance
run: make test
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.0
- name: Install Tools
run: |
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run make fmt
working-directory: acceptance
run: make fmt
- name: Run go mod tidy
working-directory: acceptance
run: go mod tidy
- name: Fail on differences
run: |
# Exit with status code 1 if there are differences (i.e. unformatted files)
git diff --exit-code