-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (57 loc) · 2.04 KB
/
e2e_tests_uat.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
name: Run E2E Tests on UAT Environment
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: [arc-runner-set]
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@v3
- name: 🦾 Create .env file
run: |
echo "PORT=3000" > .env
echo "REACT_APP_VERSION=$npm_package_version" >> .env
echo "REACT_APP_API_URL=${{ secrets.INT_EXPLORER_API_MAINNET_URL }}" >> .env
echo "REACT_APP_MAINNET_APP_URL=${{ secrets.INT_EXPLORER_API_MAINNET_URL }}" >> .env
echo 'REACT_APP_NETWORK_NAMES="{"mainnet":"Mainnet","preprod":"Preprod"}"' >> .env
echo "REACT_APP_MAINNET_API_URL=${{ secrets.INT_EXPLORER_API_MAINNET_URL }}" >> .env
echo "REACT_APP_AUTH_API_URL=${{ secrets.INT_EXPLORER_AUTH_API_URL }}" >> .env
echo "REACT_APP_NETWORK=mainnet" >> .env
echo "REACT_APP_JSD_WIDGET_KEY=${{ secrets.EXPLORER_JSD_WIDGET_KEY }}" >> .env
echo "REACT_APP_BOLNISI_NAME_API=${{ secrets.REACT_APP_BOLNISI_NAME_API }}" >> .env
- name: 🫡 Setup node
uses: actions/setup-node@v4
with:
node-version: 18
- name: 🧘♀️ Download dependencies
run: npm ci
- name: 🏂 Install serve globally
run: npm install -g serve
- name: 🚧 Build the project
run: npm run build
- name: 👻 Add empty env.global.js file
run: touch build/assets/env.global.js
- name: 🎳 Run tests
uses: cypress-io/github-action@v6
with:
start: serve -s build -L
wait-on: "http://localhost:3000"
wait-on-timeout: 360
- name: 📹 Archive test videos
uses: actions/upload-artifact@v3
if: always()
with:
name: videos
path: ./cypress/videos
- name: 🖼️ Archive test screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: screenshots
path: ./cypress/screenshots