-
Notifications
You must be signed in to change notification settings - Fork 628
107 lines (102 loc) · 3.65 KB
/
e2e-fork.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
name: Tests / E2E Fork
on:
workflow_dispatch:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
- 'LICENSE'
jobs:
# dynamically build a matrix of test/test suite pairs to run
build-test-matrix:
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- id: set-matrix
run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT
env:
TEST_EXCLUSIONS: 'TestUpgradeTestSuite,TestGrandpaTestSuite,TestIBCWasmUpgradeTestSuite'
# dynamically build a matrix of test/test suite pairs to run
build-test-matrix-wasm:
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- id: set-matrix
run: echo "matrix=$(go run cmd/build_test_matrix/main.go)" >> $GITHUB_OUTPUT
env:
TEST_ENTRYPOINT: 'TestGrandpaTestSuite'
# e2e-fork runs the e2e tests directly by using a matrix strategy.
e2e-fork:
env:
CHAIN_A_TAG: latest
CHAIN_B_TAG: latest
CHAIN_IMAGE: ibc-go-simd
RELAYER_ID: "hermes" # by default use hermes for fork e2es.
FORK: "true"
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
needs:
- build-test-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Docker Build
run: docker build . -t "${CHAIN_IMAGE}:${CHAIN_A_TAG}" --build-arg IBC_GO_VERSION=latest
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Run e2e Test
run: |
cd e2e
make e2e-test test=${{ matrix.test }}
# this workflow runs only the wasm tests.
e2e-fork-wasm:
env:
CHAIN_A_TAG: latest
CHAIN_B_TAG: latest
CHAIN_IMAGE: ibc-go-wasm-simd
RELAYER_ID: "hyperspace" # by default use hyperspace relayer for fork wasm tests.
FORK: "true"
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
needs: build-test-matrix-wasm
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.build-test-matrix-wasm.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: make python-install-deps
- name: Docker Build Wasm
run: |
version="$(scripts/get-libwasm-version.py --get-version)"
checksum="$(scripts/get-libwasm-version.py --get-checksum)"
docker build . -t "${CHAIN_IMAGE}:${CHAIN_A_TAG}" -f modules/light-clients/08-wasm/Dockerfile --build-arg LIBWASM_VERSION=${version} --build-arg LIBWASM_CHECKSUM=${checksum}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Run e2e Test
run: |
cd e2e
make e2e-test test=${{ matrix.test }}