-
Notifications
You must be signed in to change notification settings - Fork 11
57 lines (55 loc) · 2.2 KB
/
v0.2-tm2fab.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
name: tm2fab@v0.2
on: [push, pull_request]
env:
CACHE_BIN_RELAYER_KEY: bin-relayer
CACHE_BIN_RELAYER_PATH: ./build/yrly
CACHE_DOCKER_FABRIC_KEY: docker-fabric
CACHE_DOCKER_FABRIC_DIR: /tmp/fabric
CACHE_DOCKER_TENDERMINT_KEY: docker-tendermint
CACHE_DOCKER_TENDERMINT_DIR: /tmp/tendermint
jobs:
tm2fab-test:
name: tm2fab-test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Wait for build to succeed
uses: lewagon/wait-on-check-action@e2558238c09778af25867eb5de5a3ce4bbae3dcd
with:
ref: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.sha }}
check-regexp: '(relayer|tendermint|fabric)-build'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30
- name: Restore relayer binary cache
uses: actions/cache@v3
with:
path: ${{ env.CACHE_BIN_RELAYER_PATH }}
key: ${{ runner.os }}-${{ env.CACHE_BIN_RELAYER_KEY }}-${{ hashFiles('relayer/**', 'go.sum') }}
- name: Restore Tendermint docker image cache
uses: actions/cache@v3
with:
path: ${{ env.CACHE_DOCKER_TENDERMINT_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_TENDERMINT_KEY }}-${{ hashFiles('tests/chains/tendermint/**', '!**/.git/**') }}
- name: Load Tendermint docker image
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_TENDERMINT_DIR tendermint-chain0:latest
- name: Restore Fabric docker image cache
uses: actions/cache@v3
with:
path: ${{ env.CACHE_DOCKER_FABRIC_DIR }}
key: ${{ runner.os }}-${{ env.CACHE_DOCKER_FABRIC_KEY }}-${{ hashFiles('tests/chains/fabric/**', '!**/.git/**') }}
- name: Load Fabric docker images
working-directory: ./tests/scripts
run: |
./load_docker_images $CACHE_DOCKER_FABRIC_DIR \
fabric-orderer:latest \
fabric-data:latest \
fabric-peer0-org1:latest \
fabric-chaincode-org1:latest
- name: Run Test
working-directory: ./tests/cases/tm2fab
run: |
make network
make test
make network-down