This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
forked from animo/animo-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
125 lines (102 loc) · 2.96 KB
/
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
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
121
122
123
124
125
name: test
on:
pull_request:
branches: [dev]
push:
branches: [dev]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Install dependencies
run: yarn install
# - name: Check licenses
# run: yarn licenses:check
- name: Linting
run: yarn lint
- name: Prettier
run: yarn format
- name: Compile
run: yarn check-types
test-infra:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Run infra tests
run: |
cd infra
npm install
npm test
e2e:
runs-on: ubuntu-latest
needs: test
env:
FCLI_TLS_PATH: './e2e-env/config/cert/'
FCLI_SERVER: 'localhost:50052'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Start env
run: |
cd e2e-env
docker-compose up -d
- name: Install dependencies
run: yarn workspace client install
- name: Wait for cred defs to be created
run: sleep 120s
shell: bash
- name: Frontend config
run: |
echo "PORT=3001" > ./client/.env
echo "NODE_ENV=test" >> ./client/.env
echo "REACT_APP_HOST_BACKEND=http://localhost:5001" >> ./client/.env
echo "REACT_APP_HOST_WEBSOCKET=ws://localhost:5001/ws" >> ./client/.env
- name: Install cli
run: |
curl https://raw.githubusercontent.com/findy-network/findy-agent-cli/HEAD/install.sh > install.sh
chmod a+x install.sh
sudo ./install.sh -b /bin
- name: Cypress run
uses: cypress-io/github-action@v6
timeout-minutes: 10
with:
browser: chrome
start: yarn client:start
wait-on: 'http://localhost:3001'
- name: Collect docker logs
if: ${{ failure() }}
uses: jwalton/gh-docker-logs@v2.2.1
with:
dest: './tests_output/docker-logs'
- name: archive logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: e2e-logs
path: tests_output
# after the test run completes store videos and any screenshots
# NOTE: screenshots will be generated only if E2E test failed
# thus we store screenshots only on failures
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos