mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
57 lines
1.4 KiB
YAML
57 lines
1.4 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@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # 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@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # 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
|