Skip to content

User Requests Filters: Frontend #1923

User Requests Filters: Frontend

User Requests Filters: Frontend #1923

Workflow file for this run

name: Pull Request Build
on:
pull_request:
branches:
- main
paths:
- '**/**.json'
- '**/**.js'
- '**/**.jsx'
- '**/**.ts'
- '**/**.tsx'
env:
DATABASE_URL: 'postgresql://user:pass@testdb:5432/crew'
jobs:
build:
runs-on: ubuntu-latest
container: node:20.9.0-alpine
services:
testdb:
image: postgres
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
POSTGRES_DB: crew
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION }}
- uses: actions/cache@v4
with:
path: node_modules
key: npm-deps-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-deps-${{ hashFiles('package-lock.json') }}
- name: Setup packages
run: npm ci
- name: Lint
run: npm run lint
- name: Initialize database
run: npm run db:migrate
- name: Unit tests
run: npm run test
- name: Build
run: npm run build