-
Notifications
You must be signed in to change notification settings - Fork 49
87 lines (70 loc) · 2.22 KB
/
e2e-test.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
name: Cypress E2E Tests
on:
pull_request:
branches:
- master
jobs:
cypress:
name: Cypress
runs-on: ubuntu-latest
steps:
- name: Enable docker.host.internal for Ubuntu
run: |
pwd && sudo bash -c 'echo "172.17.0.1 host.docker.internal" >> /etc/hosts'
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Clone Stack
run: |
git clone -b feat/second-brain-compose https://github.com/stakwork/sphinx-stack.git stack
- name: Give Permissions to Sphinx Nav Fiber
run: pwd && ls && chmod 777 -R relay
- name: Give Permissions to Sphinx Tribes Frontend Cypress
run: chmod 777 -R cypress
- name: Give Permissions to Stack
working-directory: ./stack
run: |
chmod 777 ./bitcoind;
chmod 777 -R ./relay;
chmod 777 -R ./lnd;
chmod 777 -R ./proxy;
chmod 777 -R ./cln;
- name: Check for NODES
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: |
GITACTION_ENV=gitactionenv docker-compose -f ./stack/alts/navfiber.yml --project-dir ./stack up -d;
sleep 240;
docker ps
docker logs meme.sphinx
docker logs dave.sphinx
docker wait stack_relaysetup_1
cat stack/relay/NODES.json;
- name: Copy Node.json
uses: canastro/copy-file-action@master
with:
source: "stack/relay/NODES.json"
target: "relay/nodes.json"
- name: Copy Node.json 2
uses: canastro/copy-file-action@master
with:
source: "stack/relay/NODES.json"
target: "cypress/fixtures/nodes.json"
- name: View relay nodes
run: cat relay/nodes.json
- name: Install Frontend Dependencies
run: yarn install
- name: Start Server
run: yarn run start-e2e &
- name: Run Cypress Test
run: |
sleep 100
yarn run cy-run
- name: Stop Stack
working-directory: ./stack
run: docker-compose down