Skip to content

Merge pull request #95 from emdevelopa/backend/restrict-cors #14

Merge pull request #95 from emdevelopa/backend/restrict-cors

Merge pull request #95 from emdevelopa/backend/restrict-cors #14

name: Frontend CI
on:
pull_request:
paths:
- 'frontend/**'
types: [opened, synchronize, reopened]
push:
branches:
- main
concurrency:
group: frontend-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test-and-build:
name: Test and build (Node.js ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: frontend
- name: Run tests
run: npm run test --if-present
working-directory: frontend
- name: Build
run: npm run build
working-directory: frontend