-
Notifications
You must be signed in to change notification settings - Fork 234
59 lines (47 loc) · 1.16 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
merge_group:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go:
- '1.20'
- '1.20.10'
- '1.21'
- '1.21.3'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Generate code
run: python generate-code.py
- name: run codecov.sh
run: bash script/codecov.sh
- name: go vet
run: go vet $(go list ./... | grep -v /examples/)
- name: Compile example scripts
run: |
for file in $(find ./examples/ -name '*.go'); do
dir=$(dirname $file)
pushd $dir
go build -o /dev/null
popd
done
- name: Publish to codecov.io
run: bash <(curl -s https://codecov.io/bash)