Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/jobs/build_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ parameters:
description: The Drupal library path.
type: string
default: ""
storybook_path:
description: Path to built Storybook or KSS.
type: string
default: app/styleguide
init:
type: steps
description: Initialise the front-end dependencies.
Expand Down Expand Up @@ -65,7 +69,7 @@ steps:
- persist_to_workspace:
root: /data
paths:
- app/styleguide
- <<parameters.storybook_path>>
- <<parameters.library_path>>
- <<parameters.theme_path>>/css
- <<parameters.theme_path>>/js
Expand Down
21 changes: 21 additions & 0 deletions src/jobs/test_frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
description: |
Frontend linting and test.

The following npm commands are required and will be called:
- npm run lint
- npm run test:ci

parameters:
executor:
type: executor
description: The executor to use.

executor: <<parameters.executor>>

steps:
- checkout
- attach_workspace:
at: /data
- run:
name: "Test"
command: npm run test:ci
24 changes: 24 additions & 0 deletions src/jobs/test_storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
description: |
Tests storybook.

The following npm commands are required and will be called:
- npm run http-server
- npm run test-storybook:ci

docker:
- image: mcr.microsoft.com/playwright:v1.44.1-jammy

steps:
- checkout
- attach_workspace:
at: /data
- run:
name: "Start Storybook"
command: npm run http-server
background: true
- run:
name: "Install Playwright"
command: npx playwright install --with-deps
- run:
name: "Test Storybook"
command: npm run test-storybook:ci