-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.31 KB
/
run-int-e2e-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: CI - Integration and E2E Tests
on: [pull_request]
jobs:
run-unit-tests:
name: Run Integration and E2E Tests
runs-on: ubuntu-latest
services:
postgres:
image: bitnami/postgresql
ports:
- 5432:5432
env:
POSTGRESQL_USERNEME: postgres
POSTGRESQL_PASSWORD: docker
POSTGRESQL_DATABASE: projectdb
steps:
- uses: actions/checkout@v4 # Check out the repository
- uses: actions/setup-node@v4 # Set up Node.js environment
with:
node-version: 18
cache: 'npm'
- run: npm ci # Install dependencies
- run: npx prisma generate --schema ./src/shared/infrastructure/database/prisma/schema.prisma
env:
DATABASE_URL: 'postgresql://postgres:docker@localhost:5432/projectdb?schema=public'
- run: npm run test:int
env:
APP_PORT: 3000
NODE_ENV: test
JWT_SECRET: fake_secret
JWT_EXPIRES_IN: 86400
DATABASE_URL: 'postgresql://postgres:docker@localhost:5432/projectdb?schema=public'
- run: npm run test:e2e
env:
APP_PORT: 3000
NODE_ENV: test
JWT_SECRET: fake_secret
JWT_EXPIRES_IN: 86400
DATABASE_URL: 'postgresql://postgres:docker@localhost:5432/projectdb?schema=public'