-
Notifications
You must be signed in to change notification settings - Fork 31
53 lines (53 loc) · 1.31 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
env:
DEFAULT_GO_VERSION: "~1.23.0"
jobs:
generate-and-check:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Generate
run: make clean protobuf
- name: Check
run: make toolchain-check check-clean-work-tree
compatibility-test:
strategy:
matrix:
go-version: ["~1.23.0", "~1.22.4"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
check-latest: true
cache-dependency-path: "**/go.sum"
- name: Generate
run: make clean protobuf go-mod-tidy
- name: Run tests
run: make test
test-compatibility:
runs-on: ubuntu-latest
needs: [compatibility-test]
if: always()
steps:
- name: Test if compatibility-test workflow passed
run: |
echo ${{ needs.compatibility-test.result }}
test ${{ needs.compatibility-test.result }} == "success"