-
Notifications
You must be signed in to change notification settings - Fork 2
120 lines (101 loc) · 4 KB
/
e2e.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: End-to-end Test
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
without-auditor:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14.x
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Start up a Local Scalar DL Network
working-directory: .github
run: |
git init
git pull https://${{ github.repository_owner }}:${{ secrets.CR_PAT }}@github.com/scalar-labs/scalardl-samples.git 3.5
docker-compose -f docker-compose.yml -f expose-cassandra-port.yml up -d cassandra
echo -n "Wait for C* "
until docker exec scalardl-samples-cassandra-1 cqlsh 2> /dev/null ; do
sleep 0.5
echo -n "#"
done
echo ""
docker run --rm --network scalar-network -v "${PWD}/scalardb-schema-loader.properties":/scalardb.properties -v "${PWD}/schema.json":/schema.json ghcr.io/scalar-labs/scalardb-schema-loader:3.6.0 -c /scalardb.properties -f /schema.json
docker-compose -f docker-compose.yml -f expose-cassandra-port.yml up scalardl-ledger-schema-loader-cassandra
docker-compose -f docker-compose.yml -f expose-cassandra-port.yml up -d scalar-ledger ledger-envoy
sleep 5
- name: Update NPM to the latest stable version
run: npm install -g npm@latest
- name: NPM Install
run: npm install
- name: NPM Test
run: npm test
with-auditor:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14.x
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Start up a Local Scalar DL Network with Auditor
working-directory: .github
run: |
git init
git pull https://${{ github.repository_owner }}:${{ secrets.CR_PAT }}@github.com/scalar-labs/scalardl-samples.git 3.5
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d cassandra
echo -n "Wait for C* "
until docker exec scalardl-samples-cassandra-1 cqlsh 2> /dev/null ; do
sleep 0.5
echo -n "#"
done
echo ""
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up scalardl-ledger-schema-loader-cassandra
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up scalardl-auditor-schema-loader-cassandra
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d scalar-ledger
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d scalar-auditor
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d ledger-envoy
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d auditor-envoy
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d scalar-ledger-as-client
docker-compose -f docker-compose.yml -f docker-compose-auditor.yml up -d scalar-audior-as-client
sleep 5
docker restart scalardl-samples-scalar-ledger-1 # just in case
docker restart scalardl-samples-scalar-auditor-1 # just in case
sleep 5
- name: Update NPM to the latest stable version
run: npm install -g npm@latest
- name: NPM Install
run: npm install
- name: NPM Test
run: npm run test-auditor