-
Notifications
You must be signed in to change notification settings - Fork 11
83 lines (77 loc) · 3.47 KB
/
ci.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
name: Cypress E2E and Integration Testing
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
cypress-run:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_ENV: "dev"
NEXT_PUBLIC_TEST_ENV: "true"
NEXT_PUBLIC_CHAIN: "testnet"
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }}
NEXT_PUBLIC_INFURA_URL: ${{ secrets.NEXT_PUBLIC_INFURA_URL }}
NEXT_PUBLIC_GTAG: ${{ secrets.NEXT_PUBLIC_GTAG }}
NEXT_PUBLIC_GOOGLE_SHEETS_EMAIL: ${{ secrets.NEXT_PUBLIC_GOOGLE_SHEETS_EMAIL }}
NEXT_PUBLIC_GOOGLE_SPREADSHEET_ID: ${{ secrets.NEXT_PUBLIC_GOOGLE_SPREADSHEET_ID }}
NEXT_PUBLIC_GOOGLE_SHEETS_SECRET_1: ${{ secrets.NEXT_PUBLIC_GOOGLE_SHEETS_SECRET_1 }}
NEXT_PUBLIC_GOOGLE_SHEETS_SECRET_2: ${{ secrets.NEXT_PUBLIC_GOOGLE_SHEETS_SECRET_2 }}
NEXT_PUBLIC_ANNOUNCEMENTS_API_URL: ${{ secrets.NEXT_PUBLIC_ANNOUNCEMENTS_API_URL }}
NEXT_PUBLIC_ASSETS_URL: ${{ secrets.NEXT_PUBLIC_ASSETS_URL }}
NEXT_PUBLIC_SWEEPSTAKES_OWNER: "0x0724d0eb7b6d32AEDE6F9e492a5B1436b537262b"
NEXT_PUBLIC_THIRDWEB_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_THIRDWEB_CLIENT_ID }}
NEXT_PUBLIC_THIRDWEB_SECRET_KEY: ${{ secrets.NEXT_PUBLIC_THIRDWEB_SECRET_KEY }}
NEXT_PUBLIC_PRIVY_APP_ID: ${{secrets.NEXT_PUBLIC_PRIVY_APP_ID}}
NEXT_PUBLIC_MONGO_MOONDAO_API_KEY: ${{secrets.NEXT_PUBLIC_MONGO_MOONDAO_API_KEY}}
ALLOWED_ORIGIN: "http://localhost:3000"
TYPEFORM_PERSONAL_ACCESS_TOKEN: ${{secrets.TYPEFORM_PERSONAL_ACCESS_TOKEN}}
NEXT_PUBLIC_TYPEFORM_TEAM_FORM_ID: ${{secrets.NEXT_PUBLIC_TYPEFORM_TEAM_FORM_ID}}
NEXT_PUBLIC_TYPEFORM_CITIZEN_FORM_ID: ${{secrets.NEXT_PUBLIC_TYPEFORM_CITIZEN_FORM_ID}}
NEXT_PUBLIC_TYPEFORM_CITIZEN_SHORT_FORM_ID: ${{secrets.NEXT_PUBLIC_TYPEFORM_CITIZEN_SHORT_FORM_ID}}
NEXT_PUBLIC_TYPEFORM_CITIZEN_APP_FORM_ID: ${{secrets.NEXT_PUBLIC_TYPEFORM_CITIZEN_APP_FORM_ID}}
NEXT_PUBLIC_TYPEFORM_TEAM_APP_FORM_ID: ${{secrets.NEXT_PUBLIC_TYPEFORM_TEAM_APP_FORM_ID}}
COMFYICU_API_KEY: ${{secrets.COMFYICU_API_KEY}}
S3_UPLOAD_KEY: ${{secrets.S3_UPLOAD_KEY}}
S3_UPLOAD_SECRET: ${{secrets.S3_UPLOAD_SECRET}}
S3_UPLOAD_BUCKET: ${{secrets.S3_UPLOAD_BUCKET}}
S3_UPLOAD_REGION: ${{secrets.S3_UPLOAD_REGION}}
IRON_SESSION: ${{secrets.IRON_SESSION}}
steps:
- name: Checkout
uses: actions/checkout@v3
# Run cypress E2E tests
- name: Run Cypress E2E Testing
uses: cypress-io/[email protected]
with:
working-directory: ui
install-command: yarn install
build: yarn build
start: yarn start
wait-on: "http://localhost:3000"
#Run cypress component tests
- name: Run Cypress Component Testing
uses: cypress-io/[email protected]
with:
working-directory: ui
install: false
start: yarn next start -p 3001
wait-on: "http://localhost:3001"
component: true
# Save screenshots on fail
- name: Upload Cypress Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: ui/cypress/screenshots
# Save test run videos, always
- name: Upload Cypress Videos
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: ui/cypress/videos