Skip to content

Nodejs Lint and Build - main #11

Nodejs Lint and Build - main

Nodejs Lint and Build - main #11

name: Lint and Build Frontend
run-name: Nodejs Lint and Build - ${{ github.ref_name }}
on:
push:
branches: ["main", "develop", "feature/*", "!task/*"]
paths: &filters
- "frontend/**"
pull_request:
branches: ["main", "develop", "release"]
types: [opened, synchronize, ready_for_review]
paths: *filters
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: frontend
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
build:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run build
run: npm run build