User Requests Filters: Frontend #1923
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |