Search, sort, and filters #182
Workflow file for this run
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 frontend & backend unit tests | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
backend: | |
name: Backend tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
- name: Run tests | |
working-directory: backend | |
run: | | |
npm ci | |
npm run test | |
env: | |
CI: true | |
PORT: ${{ secrets.PORT }} | |
MONGODB_URI: ${{ secrets.MONGODB_URI }} | |
FRONTEND_ORIGIN: ${{ secrets.FRONTEND_ORIGIN }} | |
EMAIL_USER: ${{ secrets.EMAIL_USER }} | |
EMAIL_APP_PASSWORD: ${{ secrets.EMAIL_APP_PASSWORD }} | |
EMAIL_NOTIFICATIONS_RECIPIENT: ${{ secrets.EMAIL_NOTIFICATIONS_RECIPIENT }} | |
BACKEND_FIREBASE_SETTINGS: ${{ secrets.BACKEND_FIREBASE_SETTINGS }} | |
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }} | |
frontend: | |
name: Frontend tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
- name: Run tests | |
working-directory: frontend | |
run: | | |
npm ci | |
npm run test | |
env: | |
CI: true | |
NEXT_PUBLIC_BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }} | |
NEXT_PUBLIC_FIREBASE_SETTINGS: ${{ secrets.NEXT_PUBLIC_FIREBASE_SETTINGS }} |