mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 01:54:18 -08:00
46 lines
No EOL
1.4 KiB
YAML
46 lines
No EOL
1.4 KiB
YAML
name: Pull Request Frontend
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "client/**"
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
frontend-build:
|
|
runs-on: ubuntu-latest
|
|
environment: PR
|
|
defaults:
|
|
run:
|
|
working-directory: client
|
|
strategy:
|
|
matrix:
|
|
node-version: [14.x]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Install
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run build --if-present
|
|
env:
|
|
# See the client readme for more info on environment variables:
|
|
# https://github.com/usds/justice40-tool/blob/main/client/README.md
|
|
DATA_SOURCE: cdn
|
|
# TODO: Update main URL when either is back up
|
|
SITE_URL: "${{ secrets.SITE_URL }}"
|
|
MAPBOX_STYLES_READ_TOKEN: "${{ secrets.MAPBOX_STYLES_READ_TOKEN }}"
|
|
- name: Get directory contents
|
|
run: ls -la public
|
|
- name: Lint
|
|
run: npm run lint
|
|
# Disabling for now due to jsonlint - TODO: put this back
|
|
# - name: License Check
|
|
# run: npm run licenses
|
|
- name: Test
|
|
run: npm test
|
|
# - name: Check for security vulnerabilities
|
|
# run: npm audit --production |