-
Notifications
You must be signed in to change notification settings - Fork 78
82 lines (66 loc) · 1.86 KB
/
build-test.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: build-test
on: [ pull_request ]
jobs:
validate-go-mod:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: setup env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- uses: actions/checkout@v4
- run: go mod tidy -compat=1.17
build-kurl-utils:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: setup env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- uses: actions/checkout@v4
- run: make -C kurl_util test build
build-bin-kurl:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: setup env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- uses: actions/checkout@v4
- run: make test build/bin/kurl
test-shell:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: make docker-test-shell
build-test-success:
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- validate-go-mod
- build-kurl-utils
- build-bin-kurl
- test-shell
steps:
- run: |
if [ "${{ needs.validate-go-mod.result }}" = "failure" ] \
|| [ "${{ needs.build-kurl-utils.result }}" = "failure" ] \
|| [ "${{ needs.build-bin-kurl.result }}" = "failure" ] \
|| [ "${{ needs.test-shell.result }}" = "failure" ]
then
echo "build test failure"
exit 1
fi
echo "build test success"