Skip to content

App router migration new relic configuration (#1086) #105

App router migration new relic configuration (#1086)

App router migration new relic configuration (#1086) #105

Workflow file for this run

name: Cypress tests # on both PRs and push to develop/main
# Trigger is like this because I want a way to select which branches to run cypress tests.
# Can change to something better in the future
on:
push:
branches:
- 'run-cypress-tests/**'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Use NodeJs
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Run linting
run: yarn lint
- name: Build app
run: yarn build
env:
NEXT_PUBLIC_ROLLBAR_ENV: CI
NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA: ci
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN }}
NEXT_PUBLIC_STORYBLOK_TOKEN: ${{ secrets.NEXT_PUBLIC_STORYBLOK_TOKEN }}
cypress-run:
name: Cypress e2e tests
needs: build
runs-on: ubuntu-latest
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving Cypress Cloud hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 3 copies of the current job in parallel
# this will automatically load balance
containers: [1, 2, 3]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run cypress
uses: cypress-io/github-action@v6.7.6
with:
browser: chrome
spec: cypress/**/*.cy.tsx
headed: false
record: true # send results to cypress dashboard
parallel: true
env:
NEXT_PUBLIC_ROLLBAR_ENV: CI
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN }}
NEXT_PUBLIC_STORYBLOK_TOKEN: ${{ secrets.NEXT_PUBLIC_STORYBLOK_TOKEN }}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
CYPRESS_MAIL_SLURP_API_KEY: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}}
CYPRESS_INBOX_ID: ${{secrets.CYPRESS_INBOX_ID}}
CYPRESS_SUPER_ADMIN_EMAIL: ${{secrets.CYPRESS_SUPER_ADMIN_EMAIL}}
CYPRESS_SUPER_ADMIN_PASSWORD: ${{secrets.CYPRESS_SUPER_ADMIN_PASSWORD}}
CYPRESS_BUMBLE_PARTNER_ADMIN_EMAIL: ${{secrets.CYPRESS_BUMBLE_ADMIN_EMAIL}}
CYPRESS_BUMBLE_PARTNER_ADMIN_PASSWORD: ${{secrets.CYPRESS_BUMBLE_ADMIN_PASSWORD}}
CYPRESS_BADOO_PARTNER_ADMIN_EMAIL: ${{secrets.CYPRESS_BADOO_ADMIN_EMAIL}}
CYPRESS_BADOO_PARTNER_ADMIN_PASSWORD: ${{secrets.CYPRESS_BADOO_ADMIN_PASSWORD}}
CYPRESS_PUBLIC_EMAIL: ${{secrets.CYPRESS_PUBLIC_EMAIL}}
CYPRESS_PUBLIC_PASSWORD: ${{secrets.CYPRESS_PUBLIC_PASSWORD}}
CYPRESS_PUBLIC_NAME: ${{secrets.CYPRESS_PUBLIC_NAME}}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}