-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (68 loc) · 2.37 KB
/
e2e.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
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
name: e2e driver-did-iden3
on:
pull_request:
workflow_dispatch:
jobs:
run_e2e:
env:
STATE_CONTRACT_ADDRESS_POLYGON_AMOY: "0x1a4cC30f2aA0377b0c3bc9848766D90cb4404124"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build file with supported networks
run: |
echo -e "polygon:" > resolvers.settings.yaml
echo -e " amoy:" >> resolvers.settings.yaml
echo -e " contractAddress: ${{ env.STATE_CONTRACT_ADDRESS_POLYGON_AMOY }}" >> resolvers.settings.yaml
echo -e " networkURL: ${{ secrets.POLYGON_AMOY_NODE_URL }}" >> resolvers.settings.yaml
- name: Docker build driver container
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
load: true
tags: iden3-did-driver:develop
cache-from: type=gha
cache-to: type=gha
- name: iden3-did-driver
run: docker run -p 8080:8080 -d --network host --name iden3-did-driver iden3-did-driver:develop
- name: logs
run: docker logs iden3-did-driver
- name: Readiness probe for issuer service
run: >
curl --connect-timeout 5
--max-time 10
--retry 10
--retry-max-time 120
--retry-connrefused
'http://localhost:8080/status'
# TESTS
- name: Run Newman e2e
id: e2e
continue-on-error: true
run: |
npm install -g newman && \
newman run tests/e2e/http_nameservice.postman_collection.json \
-g ./tests/e2e/dev_env.json \
--global-var issuer_server=${{ secrets.ISSUER_URL }} \
--global-var username=${{ secrets.ISSUER_NODE_USER }} \
--global-var password=${{ secrets.ISSUER_NODE_PASSWROD }} \
--bail --verbose
- name: Run state tests
id: e2e_state
continue-on-error: true
run: |
npm install -g newman && \
newman run tests/e2e/state_resolve_tests.json \
-g ./tests/e2e/dev_env.json \
--bail --verbose
- name: e2e tests finished
if: steps.e2e.outcome != 'success'
run: exit 1
- name: e2e test state finished
if: steps.e2e_state.outcome != 'success'
run: exit 1
# / TESTS