Skip to content

Updates

Updates #51

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