Skip to content

App-Expansion #1 (MDP-96) #33

App-Expansion #1 (MDP-96)

App-Expansion #1 (MDP-96) #33

Workflow file for this run

name: Cypress E2E and Integration Testing
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
cypress-run:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_CHAIN: "goerli"
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 }}
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