-
Notifications
You must be signed in to change notification settings - Fork 157
62 lines (50 loc) · 1.74 KB
/
go.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
env:
# We have to change the working directory because of GOPATH
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
working-directory-rel: src/github.com/${{ github.repository }}
GOPATH: ${{ github.workspace }}
runs-on: ubuntu-20.04
steps:
- name: Check out code into the GOPATH directory
uses: actions/checkout@v2
with:
path: ${{ env.working-directory-rel }}
- name: Install python3 deps
run: pip3 install requests
- name: Cache tools
id: cache-tools
uses: actions/cache@v1
with:
path: ${{ format('{0}/bin/deps', env.working-directory-rel) }}
key: ${{ runner.os }}-${{ hashFiles(format('{0}/hack/binary_deps.py', env.working-directory-rel)) }}
- name: Install binary deps
if: steps['cache-tools'].outputs['cache-hit'] != 'true'
working-directory: ${{ env.working-directory }}
run: make bin/deps
- name: Go Dependencies
working-directory: ${{ env.working-directory }}
run: hack/run_and_diff.py make vendor
- name: Code Formatting
working-directory: ${{ env.working-directory }}
run: hack/run_and_diff.py -v make fmt
- name: Code Inspection
working-directory: ${{ env.working-directory }}
run: hack/run_and_diff.py -v make vet
- name: Unit Tests
working-directory: ${{ env.working-directory }}
run: hack/run_and_diff.py -v make test
- name: Build
working-directory: ${{ env.working-directory }}
run: make local-build
# TODO:
# - docker push?
# - E2E