mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 18:11:16 +01:00
78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
name: Frontend Checks
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "frontend/**"
|
|
push:
|
|
branches:
|
|
- "master"
|
|
paths:
|
|
- "frontend/**"
|
|
|
|
# A new push cancels a PR's superseded run; each master commit keeps its own.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up the frontend
|
|
uses: ./.github/actions/setup-frontend
|
|
|
|
- name: Run tests (vitest, includes Storybook play() tests)
|
|
run: npm test
|
|
working-directory: frontend
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up the frontend
|
|
uses: ./.github/actions/setup-frontend
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
working-directory: frontend
|
|
|
|
typecheck:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up the frontend
|
|
uses: ./.github/actions/setup-frontend
|
|
|
|
- name: Run typecheck
|
|
run: npm run typecheck
|
|
working-directory: frontend
|
|
|
|
- name: Run scripts typecheck
|
|
run: npm run typecheck:scripts
|
|
working-directory: frontend
|
|
|
|
- name: Lockfile lint
|
|
run: |
|
|
[ -z "$(jq -r '.packages | to_entries[] | select((.key | contains("node_modules")) and (.value.resolved | contains("git+ssh") | not) and (.value | has("resolved") and has("integrity") | not)) | .key' < package-lock.json)" ]
|
|
working-directory: frontend
|