Skip to content

Add Jest to test workflow. #1

Add Jest to test workflow.

Add Jest to test workflow. #1

Workflow file for this run

name: Tests
on:
workflow_dispatch:
pull_request:
branches:
- 'develop'
- 'release/**'
- 'master'
jobs:
release:
name: Integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-replica-set: test-rs
mongodb-version: '6.0'
mongodb-port: 27017
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: |
npm ci
- name: Prisma generate
run: |
npm run prisma:generate
- name: Run Cypress e2e tests
run: |
npm run cypress:run
env:
# Prisma
DATABASE_URL: mongodb://localhost:27017/testing
PLATFORM_DATABASE_URL: ${{ secrets.PLATFORM_DATABASE_URL }}
# Next Auth
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: abc
# Next Auth Discord Provider
DISCORD_CLIENT_ID: 123
DISCORD_CLIENT_SECRET: abc
# Next Auth Google Provider
GOOGLE_CLIENT_ID: 123
GOOGLE_CLIENT_SECRET: abc
# Next Auth Facebook provider
FACEBOOK_CLIENT_ID: 123
FACEBOOK_CLIENT_SECRET: abc
# Email Server
EMAIL_SERVER_HOST: host
EMAIL_SERVER_PORT: 1234
EMAIL_SERVER_USER: user
EMAIL_SERVER_PASSWORD: pass
EMAIL_FROM: [email protected]
# DEGREE VALIDATOR
VALIDATOR: ${{ secrets.VALIDATOR }}
NODE_ENV: test
VERCEL_ENV: preview
# UMAMI
NEXT_PUBLIC_UMAMI_URL: hi
NEXT_PUBLIC_UMAMI_WEBSITE_ID: bye
name: Unit tests

Check failure on line 81 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 81
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: |
npm ci
- name: Run unit tests with Jest
run: |
npm test -- --passWithNoTests