Skip to content

Commit

Permalink
Merge main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminJohnson2204 committed Feb 23, 2024
2 parents 82137bb + c60b6b4 commit 81e86af
Show file tree
Hide file tree
Showing 30 changed files with 1,499 additions and 666 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/lint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Lint, style, and compilation checks

on:
pull_request:
branches:
branches:
- main

jobs:
Expand All @@ -16,6 +16,16 @@ jobs:
run: |
npm ci
npm run lint-check
env:
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 check
runs-on: ubuntu-latest
Expand All @@ -27,3 +37,6 @@ jobs:
npm ci
npm run lint-check
npm run build
env:
NEXT_PUBLIC_BACKEND_URL: ${{ secrets.NEXT_PUBLIC_BACKEND_URL }}
NEXT_PUBLIC_FIREBASE_SETTINGS: ${{ secrets.NEXT_PUBLIC_FIREBASE_SETTINGS }}
22 changes: 17 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Run frontend & backend unit tests
on:
pull_request:
branches:
branches:
- main

jobs:
backend:
name: Backend tests
Expand All @@ -12,11 +13,20 @@ jobs:
- uses: actions/setup-node@v3
- name: Run tests
working-directory: backend
env:
CI: true
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
Expand All @@ -25,8 +35,10 @@ jobs:
- uses: actions/setup-node@v3
- name: Run tests
working-directory: frontend
env:
CI: true
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 }}
17 changes: 9 additions & 8 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Example environment variables for backend. Any "<example>"s should be
# replaced with the real values.
PORT=3001
MONGODB_URI="mongodb://127.0.0.1:27017/pap"
FRONTEND_ORIGIN="http://localhost:3000"
EMAIL_USER="<example>@gmail.com"
EMAIL_APP_PASSWORD="<example>"
BACKEND_FIREBASE_SETTINGS='<example>'
# Example environment variables for backend. Any "<example>"s should be
# replaced with the real values.
PORT=3001
MONGODB_URI="mongodb://127.0.0.1:27017/pap"
FRONTEND_ORIGIN="http://localhost:3000"
EMAIL_USER="<example>@gmail.com"
EMAIL_APP_PASSWORD="<example>"
BACKEND_FIREBASE_SETTINGS='<example>'
SERVICE_ACCOUNT_KEY='<example>'
Loading

0 comments on commit 81e86af

Please sign in to comment.