mirror of
https://github.com/rommapp/romm.git
synced 2026-07-01 08:16:21 +00:00
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: Frontend Checks
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "frontend/**"
|
|
push:
|
|
branches:
|
|
- "master"
|
|
paths:
|
|
- "frontend/**"
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.3.0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v5.0.0
|
|
with:
|
|
node-version-file: frontend/.nvmrc
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: frontend
|
|
|
|
- name: Run tests (vitest, includes Storybook play() tests)
|
|
run: npm test
|
|
working-directory: frontend
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4.3.0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v5.0.0
|
|
with:
|
|
node-version-file: frontend/.nvmrc
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: frontend
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
working-directory: frontend
|