-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.09 KB
/
pr-build-and-test.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
name: pr-build-and-test
on:
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
environment: dev
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
- name: Install dependencies
run: npm install
- name: Build the project
run: npm run build
- name: Run tests
env:
NODE_ENV: ${{ github.env }}
EXPRESS_PORT: ${{ secrets.EXPRESS_PORT }}
ALLOWED_ORIGINS: ${{ secrets.ALLOWED_ORIGINS }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }}
POSTGRES_DATABASE: ${{ secrets.POSTGRES_DATABASE }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }}
POSTGRES_SSL: ${{ secrets.POSTGRES_SSL }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
BCRYPT_PEPPER: ${{ secrets.BCRYPT_PEPPER }}
BCRYPT_SALT_ROUNDS: ${{ secrets.BCRYPT_SALT_ROUNDS }}
run: npm test