(fix) Consultee Dashboard #12
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: Run Tests | |
on: | |
pull_request: | |
branches: [dev, staging, prod] | |
types: [opened, synchronize, reopened] | |
jobs: | |
testing-stuff: | |
runs-on: ubuntu-latest | |
env: | |
NEXTAUTH_SECRET: testing_secret | |
NEXTAUTH_URL: http://localhost:3000 | |
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
REDIS_URL: redis://localhost:6379 | |
UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }} | |
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }} | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Run Jest Unit Tests | |
run: npm run test | |
- name: Run Cypress Tests | |
uses: cypress-io/github-action@v6 | |
with: | |
build: npm run build | |
start: npm start | |
wait-on: 'http://localhost:3000' | |
record: false | |
publish-summary: true | |
component: false |