-
Notifications
You must be signed in to change notification settings - Fork 121
52 lines (43 loc) · 939 Bytes
/
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
name: Run tests
on:
push:
branches: ['*']
pull_request:
branches: ['*']
permissions:
contents: read
env:
GO111MODULE: on
jobs:
test:
strategy:
matrix:
go-version: [1.19.x, 1.20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: '**/go.sum'
- name: Vet and build
run: |
go vet ./...
go build ./...
- name: Install mockgen
run: |
go install go.uber.org/mock/mockgen
- name: Run test script
run: |
./ci/test.sh
./ci/check_panic_handling.sh
- name: Run Tests
run: |
for i in $(find $PWD -name go.mod); do
pushd $(dirname $i)
go test ./...
popd
done