Skip to content

Merge branch 'develop-minor' into v6/develop #9575

Merge branch 'develop-minor' into v6/develop

Merge branch 'develop-minor' into v6/develop #9575

Workflow file for this run

# To upgrade pinned actions: Use https://github.com/mheap/pin-github-action
name: CI - Frontend
env:
OS: &os ubuntu-24.04
TIMEOUT: &timeout 5
# run job only under the following conditions:
# - can be triggered manually from any repository
# - can be triggered as workflow call by another workflow
# - if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# - if on push, only run CI automatically for the
# main getkirby/kirby repo and for forks
SHOULD_RUN: &should-run >-
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_call' ||
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository) ||
(github.event_name == 'push' &&
(github.repository == 'getkirby/kirby' || github.repository_owner != 'getkirby'))
on:
push: &frontend-triggers
branches-ignore:
- "main"
- "release/**"
paths:
- ".github/actions/setup-npm/**"
- ".github/workflows/frontend.yml"
- "panel/**"
- "!panel/scripts/**"
pull_request: *frontend-triggers
workflow_call:
workflow_dispatch:
concurrency:
group: frontend-${{ github.ref }}
cancel-in-progress: true
jobs:
# ===================== Unit Tests =====================
tests:
name: "Unit Tests"
if: *should-run
runs-on: *os
timeout-minutes: *timeout
defaults:
run:
working-directory: panel
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Node/npm
uses: ./.github/actions/setup-npm
- name: Run JavaScript unit tests
run: npm run test:unit
- name: Check for TypeScript type errors
run: npm run types
working-directory: panel
# ===================== Coding Style =====================
coding-style:
name: "Coding Style"
if: *should-run
runs-on: *os
timeout-minutes: *timeout
defaults:
run:
working-directory: panel
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup Node/npm
uses: ./.github/actions/setup-npm
- name: "ESLint: JavaScript coding style violations"
run: npm run lint -- --max-warnings 0 --format stylish --no-fix
- name: "Prettier: JavaScript coding style violations"
run: npm run format -- --check