-
Notifications
You must be signed in to change notification settings - Fork 8
134 lines (112 loc) · 3.36 KB
/
e2e.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: End to End Tests
on:
pull_request:
env:
TAR_PATH: heighliner.tar
IBC_TAR_PATH: heighliner-ibc.tar
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-primary:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Primary Docker Image
uses: strangelove-ventures/[email protected]
with:
registry: ""
tag: local
tar-export-path: ${{ env.TAR_PATH }}
platform: linux/amd64
git-ref: ${{ github.head_ref }}
chain: layer
dockerfile: cosmos
build-target: make install
binaries: |
- /go/bin/layerd
- name: Publish Primary Tarball as Artifact
uses: actions/upload-artifact@v4
with:
name: layer-docker-image
path: ${{ env.TAR_PATH }}
# Second job: Build the IBC image, depends on the primary image job
build-ibc:
runs-on: ubuntu-latest
needs: build-primary
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Switch to IBC branch
run: |
git fetch --all
git checkout ibc
- name: Build IBC Docker Image
uses: strangelove-ventures/[email protected]
with:
registry: ""
tag: local
tar-export-path: ${{ env.IBC_TAR_PATH }}
platform: linux/amd64
git-ref: ibc
chain: layer-icq
dockerfile: cosmos
build-target: make install
binaries: |
- /go/bin/layerd
- name: Publish IBC Tarball as Artifact
uses: actions/upload-artifact@v4
with:
name: layer-icq-docker-image
path: ${{ env.IBC_TAR_PATH }}
# Prepare job (depends on both build jobs)
prepare:
runs-on: ubuntu-latest
needs:
- build-primary
- build-ibc
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Generate Matrix
id: set-matrix
run: |
TESTS=$(cd e2e && go test -list . | grep -v "^ok " | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=${TESTS}" >> $GITHUB_OUTPUT
# Test job (depends on prepare, which in turn depends on both build jobs)
test:
runs-on: ubuntu-latest
needs:
- prepare
strategy:
matrix:
test: ${{ fromJson(needs.prepare.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Download Primary Tarball
uses: actions/download-artifact@v4
with:
name: layer-docker-image
- name: Download IBC Tarball
uses: actions/download-artifact@v4
with:
name: layer-icq-docker-image
- name: Load Primary Docker Image
run: docker image load -i ${{ env.TAR_PATH }}
- name: Load IBC Docker Image
run: docker image load -i ${{ env.IBC_TAR_PATH }}
- name: Run Tests
run: cd e2e && go test -race -v -timeout 10m -run ^${{ matrix.test }}$ .