-
Notifications
You must be signed in to change notification settings - Fork 89
39 lines (33 loc) · 1.1 KB
/
jsonrpc-test.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
name: JsonRPC Test
env:
test_node_addr: "https://betanet-rpc1.artela.network"
key_privateKey: "0x4d372700bec7a86e3b5388685f92806234931bc018c02fe4b52d5c56df317f8e"
on:
push:
branches: [ ci_test ]
pull_request:
branches: [ ci_test ]
repository_dispatch:
types: [ trigger-action ]
jobs:
test-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Preparation
run: |
mkdir -p ci_scripts
cat > ci_scripts/init_env.sh <<EOF
source ~/.nvm/nvm.sh
set -ex
cd /test-scripts/pre_public_testnet/json-rpc
sed -i "s|\"node\": \".*\"|\"node\": \"$test_node_addr\"|g" project.config.json && cat project.config.json
echo $key_privateKey > privateKey.txt
node $1
EOF
cat > ci_scripts/run.sh << EOF
docker run --name testenv -v $(pwd)/ci_scripts:/ci_scripts -i simonalphafang/artela-jsonrpc-testenv:0.0.1 /bin/bash -c /ci_scripts/init_env.sh $1
EOF
chmod +x -R ci_scripts/
- name: ci_call.js
run: bash -c ci_scripts/run.sh ci_call.js