forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (95 loc) · 3.11 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# TODO HV2: remove GIT_TERMINAL_PROMPT, GOPRIVATE and GH_ACCESS_TOKEN vars once heimdall-v2 is a public repo
# also, "git config --global url.https://[email protected]/.insteadOf https://github.com/ &&" can be removed in each run step
name: CI
on:
push:
branches:
- "devel"
pull_request:
branches:
- "**"
types: [opened, synchronize]
jobs:
build:
name: build
runs-on: ubuntu-latest
env:
GIT_TERMINAL_PROMPT: 1
GOPRIVATE : github.com/0xPolygon/heimdall-v2
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: "Build binaries"
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make build
test-unit:
env:
GIT_TERMINAL_PROMPT: 1
GOPRIVATE: github.com/0xPolygon/heimdall-v2
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
name: test-unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
cache: true
cache-dependency-path: go.sum
- name: "Run unit tests"
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-unit
test-e2e:
env:
GIT_TERMINAL_PROMPT: 1
GOPRIVATE: github.com/0xPolygon/heimdall-v2
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
name: test-e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
cache: true
cache-dependency-path: go.sum
- name: "Run e2e tests"
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-e2e
test-integration:
env:
GIT_TERMINAL_PROMPT: 1
GOPRIVATE: github.com/0xPolygon/heimdall-v2
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
name: test-integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
cache: true
cache-dependency-path: go.sum
- name: "Run integration tests"
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-integration
test-ledger:
env:
GIT_TERMINAL_PROMPT: 1
GOPRIVATE: github.com/0xPolygon/heimdall-v2
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
name: test-ledger
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
cache: true
cache-dependency-path: go.sum
- name: "Run ledger tests"
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ && make test-ledger-mock