Skip to content

fix: E2E COVID tracker test (#3737) #405

fix: E2E COVID tracker test (#3737)

fix: E2E COVID tracker test (#3737) #405

# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: RUN Frontend Server Tests
env:
## Sets environment variables
NETLIFY_SITE_NAME: 'health-equity-tracker'
GITHUB_PR_NUMBER: ${{github.event.pull_request.number}}
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- 'frontend_server/**' # Run when changes occur in the frontend subfolder
defaults:
run:
working-directory: frontend_server
jobs:
frontend_unit_tests:
name: Runs frontend server unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: frontend_server/package.json
cache: 'npm'
cache-dependency-path: frontend_server/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run Vitest unit tests
run: npm test