-
Notifications
You must be signed in to change notification settings - Fork 30
109 lines (101 loc) · 2.49 KB
/
tests.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
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
install-tparse:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Display Go Version
run: go version
- uses: actions/cache@v4
id: cache-go-tparse
with:
path: ~/go/bin
key: ${{ runner.os }}-go-tparse-binary
- name: Install tparse
if: steps.cache-go-tparse.outputs.cache-hit != 'true'
run: |
go install github.com/mfridman/[email protected]
test-unit-cover:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: '1.20'
cache: true
- name: Test and Create Coverage Report
if: env.GIT_DIFF
run: |
make test-unit-cover
- uses: codecov/codecov-action@v4
if: env.GIT_DIFF
with:
file: ./coverage.txt
fail_ci_if_error: true
build-ojod:
uses: ./.github/workflows/build.yml
liveness-test:
needs: build-ojod
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: gets ojod bin
if: env.GIT_DIFF
uses: actions/download-artifact@v4
with:
name: ojod-linux-amd64
path: ./build
- name: Start single node chain
if: env.GIT_DIFF
run: |
chmod +x ./build/ojod
./scripts/single-node.sh
- name: Test Local Network Liveness
if: env.GIT_DIFF
run: |
sleep 1m
./scripts/localnet-liveness.sh 50 5 50 localhost:26657
test-e2e:
runs-on: ubuntu-latest
needs: install-tparse
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: '1.20'
cache: true
- name: Test E2E
if: env.GIT_DIFF
run: |
make test-e2e