-
Notifications
You must be signed in to change notification settings - Fork 41
61 lines (56 loc) · 1.84 KB
/
e2e-sdk.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
name: SP E2E Test with Go-SDK
on:
push:
branches:
- master
- develop
- fix-release*
pull_request:
branches:
jobs:
e2e-test:
strategy:
matrix:
go-version: [ 1.20.x ]
os: [ ubuntu-latest ]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
# Checkout Greenfield-SP
- name: Checkout Greenfield-SP
uses: actions/checkout@v3
# Run MySQL
- name: Run MySQL
run: |
sudo /etc/init.d/mysql start
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install dependencies
run: npm install ethers
# generate test private key
- name: Generate private key
run: node ./.github/workflows/generate-private-key.js
id: generate-private-key
- name: set private key and account address as job variables
run: |
echo "Private key: ${{ steps.generate-private-key.outputs.private_key }}"
echo "Account address: ${{ steps.generate-private-key.outputs.account_address }}"
echo "PRIVATE_KEY=${{ steps.generate-private-key.outputs.private_key }}" >> "$GITHUB_ENV"
echo "ACCOUNT_ADDR=${{ steps.generate-private-key.outputs.account_address }}" >> "$GITHUB_ENV"
# Build and Start Greenfield Blockchain
- name: Build and Start Greenfield Blockchain
run: |
bash ./test/e2e/spworkflow/e2e_test.sh --startChain
# Build and Start Greenfield SP
- name: Build and Start Greenfield SP
run: |
bash ./test/e2e/spworkflow/e2e_test.sh --startSP
# Run Greeenfield Go-SDK E2E Test
- name: start e2e
run: |
bash ./test/e2e/spworkflow/e2e_test.sh --runSDKE2E