HomeDashboard

Table of content


Deployment

This project is built with NextJS and Prisma, so all you need is NodeJS server with any database that Prisma supports.

For further info check NextJS and Prisma deployment guides.


Secrets

Generate Secrets

node scripts/generate-secrets

It will generate secrets in dotenv format.

NCD_SECRET='E2OAhG1AdQP4Rq1II0h0eRNiygdbfMQj7DNIOM3VoUc='
SESSION_SECRET='nBoPA6LvhkK4ZuWIlko04Id5yZQux+UvGw2H+5RNYsY='
node scripts/generate-secrets >> .env

Updating Vercel secrets

You can use any name you want for the secrets, but you have to keep same env variable names.

Vercel preview secrets
# Generate new secrets for preview
node scripts/generate-secrets > .env.preview

# Copy all the new variables for the preview
source .env.preview

vercel secret rm ncd-secret-prev --yes
vercel secrets add ncd-secret-prev "${NCD_SECRET}"
vercel env rm NCD_SECRET preview --yes
printf "ncd-secret-prev" | vercel env add secret NCD_SECRET preview

vercel secret rm ncd-session-secret-prev --yes
vercel secrets add ncd-session-secret-prev "${SESSION_SECRET}"
vercel env rm SESSION_SECRET preview --yes
printf "ncd-session-secret-prev" | vercel env add secret SESSION_SECRET preview
Vercel production secrets
# Generate new secrets for production
node scripts/generate-secrets > .env.production

# Copy all the new variables for the production
source .env.production

vercel secret rm ncd-secret-prod --yes
vercel secrets add ncd-secret-prod "${NCD_SECRET}"
vercel env rm NCD_SECRET production --yes
printf "ncd-secret-prod" | vercel env add secret NCD_SECRET production

vercel secret rm ncd-secret-prev --yes
vercel secrets add ncd-secret-prev "${SESSION_SECRET}"
vercel env rm SESSION_SECRET production --yes
printf "ncd-secret-prev" | vercel env add secret SESSION_SECRET production

Continuous Integration

You can use any CI, but you have to reconfigure Cypress agent to use Next Cypress Dashboard first. You can check Sorry Cypress documentation for that.

GitHub Actions

strategy:
  fail-fast: false
  matrix:
    container: [A, B, C, D, E, F]

steps:
  - uses: actions/checkout@v1

  - run: npm ci

  - uses: umidbekk/next-cypress-dashboard/actions/patch-cypress-config@main
    with:
      api_url: ${{ secrets.NEXT_CYPRESS_DASHBOARD_URL }}

  - run: npx cypress run --record --parallel --ci-build-id=e2e-${{ github.sha }}

  - if: failure()
    uses: actions/upload-artifact@v2
    with:
      name: cypress-${{ matrix.container }}
      path: cypress/videos

Privacy

  1. We only gather required data to display minimal test details like
    • Repository data – name and owner
    • Commit data – sha, branch, message, author name and email
    • Test data - file name, suite name, stats, errors

Please check schema.prisma file for more detail.

  1. We run daily task to remove run data:
    • Test runs (Older than 24h)
    • Test run instances (Older than 24h)
    • Test run results (Older than 24h)

Please check pages/api/[...api].api.ts file for more detail.

Back to top ⬆