forked from cosmos/ibc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.9 KB
/
e2e-compatibility-workflow-call.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
54
55
56
on:
workflow_call:
inputs:
test-file-directory:
description: 'Directory containing compatibility matrices'
required: true
type: string
test-suite:
description: 'Test suite to run'
required: true
type: string
jobs:
load-test-matrix:
outputs:
test-matrix: ${{ steps.set-test-matrix.outputs.test-matrix }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: andstor/file-existence-action@v2
with:
files: ".github/compatibility-test-matrices/${{ inputs.test-file-directory }}/${{ inputs.test-suite }}.json"
- run: |
# use jq -c to put the full json contents on a single line. This is required when using the json body
# to create the matrix in the following job.
test_matrix="$(cat .github/compatibility-test-matrices/${{ inputs.test-file-directory }}/${{ inputs.test-suite }}.json | jq -c)"
echo $test_matrix
echo "test-matrix=$test_matrix" >> $GITHUB_OUTPUT
id: set-test-matrix
e2e:
runs-on: ubuntu-latest
needs: load-test-matrix
if: needs.load-test-matrix.outputs.test-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.load-test-matrix.outputs.test-matrix) }}
steps:
- name: Checkout the ibc-go repo
uses: actions/checkout@v3
with:
repository: cosmos/ibc-go
- uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Run e2e Test
run: |
cd e2e
make e2e-test entrypoint=${{ matrix.entrypoint }} test=${{ matrix.test }}
env:
# each test has its own set of variables to specify which images are used.
CHAIN_IMAGE: "${{ matrix.chain-image }}"
CHAIN_A_TAG: "${{ matrix.chain-a }}"
CHAIN_B_TAG: "${{ matrix.chain-b }}"
CHAIN_BINARY: "${{ matrix.chain-binary }}"