This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (80 loc) · 2.53 KB
/
smoketest.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
name: bridge
on:
push:
paths:
- "bridges/snowbridge/**"
- "!bridges/snowbridge/README.md"
- "!bridges/snowbridge/LICENSE"
branches:
- snowbridge
pull_request:
workflow_dispatch:
jobs:
smoketests:
runs-on: snowbridge-runner
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1
RUSTFLAGS: -C debuginfo=1
outputs:
success: ${{ steps.run_e2e_stack.outcome == 'success' }}
steps:
- name: Set build directory environment variable
run: echo "OUTPUT_DIR=${GITHUB_WORKSPACE}/tmp" >> $GITHUB_ENV
- name: Set log directory environment variable
run: echo "LOG_DIR=${GITHUB_WORKSPACE}/log-tmp" >> $GITHUB_ENV
- name: Create directories
run: mkdir -p $OUTPUT_DIR && mkdir -p $LOG_DIR
- uses: actions/checkout@v2
with:
repository: snowfork/snowbridge
ref: smoketests-ci
path: snowbridge
submodules: "true"
- run: rm -f snowbridge/polkadot-sdk
- uses: actions/checkout@v2
with:
repository: snowfork/polkadot-sdk
ref: smoketests-ci
path: snowbridge/polkadot-sdk
- uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: run E2E stack
id: run_e2e_stack
run: |
cd snowbridge
nix develop -c sh -c '
./scripts/init.sh &&
cd web/packages/test &&
(./scripts/start-services.sh > "${{ env.LOG_DIR }}/start-services.log" 2>&1 &) &&
sleep 10 &&
./scripts/check-relayer.sh &&
./scripts/run-smoketests.sh'
continue-on-error: true
- name: Save start-services log file
uses: actions/upload-artifact@v3
with:
name: start-services.log
path: "${{ env.LOG_DIR }}/start-services.log"
- name: Save beacon-relay log file
uses: actions/upload-artifact@v3
with:
name: beacon-relay.log
path: "${{ env.OUTPUT_DIR }}/beacon-relay.log"
- name: check E2E test outcome
if: ${{ steps.run_e2e_stack.outcome != 'success' }}
run: |
echo "E2E tests failed"
exit 1