-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (50 loc) · 1.97 KB
/
cypress.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
name: 'Cypress tests'
on:
pull_request:
branches:
- develop
- tenant/*
- main
jobs:
ubuntu-job:
name: 'Cypress on Ubuntu'
runs-on: ubuntu-latest # Can be self-hosted runner also
steps:
- name: 'Checkout the repository'
uses: actions/checkout@v2
- name: Upgrade npm to latest version
run: sudo npm i -g npm@latest
- name: 'Install Node Modules'
run: npm install --legacy-peer-deps
- name: Setting Environment Variables
env:
AUTH0_CLIENT_ID : ${{ secrets.AUTH0_CLIENT_ID }}
AUTH0_CUSTOM_DOMAIN: ${{ secrets.AUTH0_CUSTOM_DOMAIN }}
TEST_MFA_URL: ${{ secrets.TEST_MFA_URL }}
TEST_ACCOUNT_PASSWORD: ${{ secrets.TEST_ACCOUNT_PASSWORD }}
run: |
echo "TENANT=planet" >> .env
echo "TENANTID=ten_NxJq55pm" >> .env
echo "NEXTAUTH_URL=http://localhost:3000" >> .env
echo "AUTH0_CLIENT_ID=$AUTH0_CLIENT_ID" >> .env
echo "AUTH0_CUSTOM_DOMAIN=$AUTH0_CUSTOM_DOMAIN" >> .env
echo "API_ENDPOINT=app-staging.plant-for-the-planet.org" >> .env
echo "CDN_URL=cdn.plant-for-the-planet.org/staging" >> .env
echo "SITE_IMAGERY_API_URL=https://raster.plant-for-the-planet.org" >> .env
echo "WIDGET_URL=https://widgets.plant-for-the-planet.org" >> .env
echo "SCHEME=https" >> .env
echo "{
\"TEST_SERVER\": \"localhost:3000\",
\"TEST_MFA_URL\": \"$TEST_MFA_URL\",
\"TEST_ACCOUNT_PASSWORD\": \"$TEST_ACCOUNT_PASSWORD\"
}" >> cypress.env.json
- name: 'Running Cypress tests'
run: |
cat .env > .env.production
npm run build && npm run export && (npm run start -p 3000 & npm run cypress:run)
- name: 'Upload Artifact'
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: Cypress
path: /home/runner/work/planet-webapp/planet-webapp/cypress/videos/