Skip to content

Commit

Permalink
test seperate postgres service
Browse files Browse the repository at this point in the history
  • Loading branch information
daisykucharski committed Oct 16, 2023
1 parent fc8bddd commit a8b2d76
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
run-api-e2e-tests:
runs-on: ubuntu-latest
name: Backend E2E Tests
services:
postgres:
image: postgres
env:
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: graduatenu
POSTGRES_DB: test
ports:
- "5433:5432"
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -38,12 +49,11 @@ jobs:
with:
node-version: "16"
- run: yarn install --immutable
- name: Start up test db
run: yarn test:db:up
- name: Run E2E tests
run: yarn test:e2e
- name: Tear down test db
run: yarn test:db:down
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5433
build-frontend-image:
runs-on: ubuntu-latest
steps:
Expand Down
10 changes: 5 additions & 5 deletions packages/api-v2/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export class AuthController {
sameSite: "strict",
secure: isSecure,
});
if (process.env.NODE_ENV !== "testing") {
await this.emailConfirmationService.sendVerificationLink(
createStudentDto.email
);
}
// if (process.env.NODE_ENV !== "testing") {
await this.emailConfirmationService.sendVerificationLink(
createStudentDto.email
);
// }
return student;
}

Expand Down

0 comments on commit a8b2d76

Please sign in to comment.