Skip to content

Structure field: clone row on duplicate #3567

Structure field: clone row on duplicate

Structure field: clone row on duplicate #3567

Workflow file for this run

# To upgrade pinned actions: Use https://github.com/mheap/pin-github-action
name: CI - Frontend
on:
push:
branches-ignore:
- "main"
- "release/**"
paths:
- ".github/workflows/frontend.yml"
- "panel/**"
- "!panel/scripts/**"
pull_request:
branches-ignore:
- "main"
- "release/**"
paths:
- ".github/workflows/frontend.yml"
- "panel/**"
- "!panel/scripts/**"
workflow_call:
workflow_dispatch:
jobs:
tests:
name: "Unit tests"
# run job only under the following conditions:
# - can be triggered manually from any repository
# - 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
if: >
github.event_name == 'workflow_dispatch' ||
(
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')
)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
- name: Set up Node.js problem matchers and cache npm dependencies
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # pin@v3
with:
cache: "npm"
cache-dependency-path: panel/package-lock.json
- name: Install npm dependencies
id: finishPrepare
run: npm ci
working-directory: panel
- name: Run JavaScript unit tests
if: always() && steps.finishPrepare.outcome == 'success'
run: npm run test:unit
working-directory: panel
coding-style:
name: "Coding Style"
# run job only under the following conditions:
# - can be triggered manually from any repository
# - 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
if: >
github.event_name == 'workflow_dispatch' ||
(
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')
)
runs-on: ubuntu-latest
timeout-minutes: 5
env:
php: "8.1"
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
- name: Set up Node.js problem matchers and cache npm dependencies
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # pin@v3
with:
cache: "npm"
cache-dependency-path: panel/package-lock.json
- name: Install npm dependencies
id: finishPrepare
run: npm ci
working-directory: panel
- name: Check for JavaScript coding style violations (ESLint)
if: always() && steps.finishPrepare.outcome == 'success'
# Use the --no-fix flag in push builds to get a failed CI status
run: >
npm run lint -- --max-warnings 0 --format stylish
${{ github.event_name != 'pull_request' && '--no-fix' || '' }}
working-directory: panel
- name: Create code suggestions from the coding style changes (on PR only)
if: >
always() && steps.finishPrepare.outcome == 'success' &&
github.event_name == 'pull_request'
uses: reviewdog/action-suggester@3f60d0e826f0873905e0eeca522d562a6e67afbd # pin@v1
with:
tool_name: ESLint
fail_on_error: "true"
- name: Check for JavaScript coding style violations (Prettier)
if: always() && steps.finishPrepare.outcome == 'success'
# Use the --check flag in push builds to get a failed CI status
run: >
npm run format --
${{ github.event_name != 'pull_request' && '--check' || '--write' }}
working-directory: panel
- name: Create code suggestions from the coding style changes (on PR only)
if: >
always() && steps.finishPrepare.outcome == 'success' &&
github.event_name == 'pull_request'
uses: reviewdog/action-suggester@3f60d0e826f0873905e0eeca522d562a6e67afbd # pin@v1
with:
tool_name: Prettier
fail_on_error: "true"