Fix CRM - Accounts - Update form #86
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress Tests | |
on: [push] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization | |
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs | |
# Also see warning here https://github.com/cypress-io/github-action#parallel | |
strategy: | |
fail-fast: false # https://github.com/cypress-io/github-action/issues/48 | |
matrix: | |
containers: [1, 2] # Uses 2 parallel instances | |
mongodb-version: ['4.2', '4.4', '5.0', '6.0'] | |
steps: | |
- name: Start MongoDB | |
uses: supercharge/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
mongodb-username: nextcrm | |
mongodb-password: nextcrm | |
mongodb-db: nextcrm | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prisma Schema Validate | |
uses: elijaholmos/[email protected] | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
- name: Prisma Generate and Push | |
run: | | |
npx prisma generate | |
npx prisma db push | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
- name: Cypress run | |
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action | |
uses: cypress-io/github-action@v5 | |
with: | |
# Starts web server for E2E tests - replace with your own server invocation | |
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server | |
build: npm run build | |
start: npm start | |
wait-on: 'http://localhost:3000' # Waits for above | |
# Records to Cypress Cloud | |
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record | |
record: false | |
parallel: false # Runs test in parallel using settings above | |
env: | |
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY | |
# in GitHub repo → Settings → Secrets → Actions | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GOOGLE_ID: ${{ secrets.GOOGLE_ID }} | |
GOOGLE_SECRET: ${{ secrets.GOOGLE_SECRET }} | |
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} | |
DO_ENDPOINT: ${{ secrets.DO_ENDPOINT }} | |
DO_REGION: ${{ secrets.DO_REGION }} | |
DO_ACCESS_KEY_ID: ${{ secrets.DO_ACCESS_KEY_ID }} | |
DO_ACCESS_KEY_SECRET: ${{ secrets.DO_ACCESS_KEY_SECRET }} | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
JWT_SECRET: ${{ secrets.JWT_SECRET }} | |
NEXTCRM_TOKEN: ${{ secrets.NEXTCRM_TOKEN }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }} | |
NEXT_PUBLIC_APP_NAME: ${{ secrets.NEXT_PUBLIC_APP_NAME }} | |
NEXT_PUBLIC_APP_V: ${{ secrets.NEXT_PUBLIC_APP_V }} | |
NEXT_PUBLIC_APP_URL: ${{ secrets.NEXT_PUBLIC_APP_URL }} |