-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (66 loc) · 3.16 KB
/
e2e-tests.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
name: E2E tests
on:
pull_request:
branches: [main]
jobs:
e2e-tests:
name: E2E tests
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20.17.0
- name: Create .env file
run: |
echo "VITE_AWS_API_KEY_REGIONS=${{ secrets.VITE_AWS_API_KEY_REGIONS }}" >> .env
echo "VITE_AWS_API_KEYS=${{ secrets.VITE_AWS_API_KEYS }}" >> .env
echo "VITE_AWS_COGNITO_IDENTITY_POOL_IDS=${{ secrets.VITE_AWS_COGNITO_IDENTITY_POOL_IDS }}" >> .env
echo "VITE_AWS_WEB_SOCKET_URLS=${{ secrets.VITE_AWS_WEB_SOCKET_URLS }}" >> .env
echo "VITE_PINPOINT_IDENTITY_POOL_ID=${{ secrets.VITE_PINPOINT_IDENTITY_POOL_ID }}" >> .env
echo "VITE_PINPOINT_APPLICATION_ID=${{ secrets.VITE_PINPOINT_APPLICATION_ID }}" >> .env
echo "VITE_AWS_CF_TEMPLATE=${{ secrets.VITE_AWS_CF_TEMPLATE }}" >> .env
echo "VITE_APPLE_APP_STORE_LINK=${{ secrets.VITE_APPLE_APP_STORE_LINK }}" >> .env
echo "VITE_GOOGLE_PLAY_STORE_LINK=${{ secrets.VITE_GOOGLE_PLAY_STORE_LINK }}" >> .env
echo "VITE_APP_VERSION=${{ secrets.VITE_APP_VERSION }}" >> .env
echo "VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE=${{ secrets.VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE }}" >> .env
echo "VITE_MIGRATE_A_WEB_APP_PAGE=${{ secrets.VITE_MIGRATE_A_WEB_APP_PAGE }}" >> .env
echo "VITE_MIGRATE_AN_ANDROID_APP_PAGE=${{ secrets.VITE_MIGRATE_AN_ANDROID_APP_PAGE }}" >> .env
echo "VITE_MIGRATE_AN_IOS_APP_PAGE=${{ secrets.VITE_MIGRATE_AN_IOS_APP_PAGE }}" >> .env
echo "VITE_MIGRATE_A_WEB_SERVICE_PAGE=${{ secrets.VITE_MIGRATE_A_WEB_SERVICE_PAGE }}" >> .env
echo "VITE_PRICING_PAGE=${{ secrets.VITE_PRICING_PAGE }}" >> .env
echo "VITE_SHOW_NEW_NAVIGATION=${{ secrets.VITE_SHOW_NEW_NAVIGATION }}" >> .env
- name: Install dependencies
run: npm install
- name: Run local server
run: |
npm run dev &
echo "Server started"
sleep 10
- name: Run cypress tests
env:
CYPRESS_WEB_DOMAIN: ${{ secrets.WEB_DOMAIN }}
CYPRESS_IDENTITY_POOL_ID: ${{ secrets.IDENTITY_POOL_ID }}
CYPRESS_USER_DOMAIN: ${{ secrets.USER_DOMAIN }}
CYPRESS_USER_POOL_CLIENT_ID: ${{ secrets.USER_POOL_CLIENT_ID }}
CYPRESS_USER_POOL_ID: ${{ secrets.USER_POOL_ID }}
CYPRESS_WEB_SOCKET_URL: ${{ secrets.WEB_SOCKET_URL }}
CYPRESS_COGNITO_EMAIL: ${{ secrets.COGNITO_EMAIL }}
CYPRESS_COGNITO_PASSWORD: ${{ secrets.COGNITO_PASSWORD }}
PINPOINT_IDENTITY_POOL_ID: ${{ secrets.VITE_PINPOINT_IDENTITY_POOL_ID }}
PINPOINT_APPLICATION_ID: ${{ secrets.VITE_PINPOINT_APPLICATION_ID }}
run: npm run cypress
- name: Upload cypress report
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-reports
path: cypress/reports
- name: Upload cypress screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots
path: cypress/screenshots