Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements for Storybook #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions src/examples/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ usage:
context: skpr-example
executor:
name: drupal/node
tag: 14-1.x
theme_path: app/themes/mytheme
tag: 20-v2-edge
storybook_path: app/storybook
library_path: app/libraries/mylibrary
- drupal/build_backend:
context: skpr-example
Expand Down
30 changes: 11 additions & 19 deletions src/jobs/build_frontend.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
description: |
Build the Drupal front-end.
Build the front-end.

The following Make targets are required and will be called:
- init-frontend
- lint-frontend
- build-frontend
The following npm commands are required and will be called:
- npm run lint
- npm run build

parameters:
executor:
type: executor
description: The executor to use.
theme_path:
description: The Drupal theme path.
storybook_path:
description: The Storybook build path.
type: string
library_path:
description: The Drupal library path.
Expand All @@ -22,26 +21,22 @@ parameters:
description: Initialise the front-end dependencies.
default:
- run:
name: Init
command: make init-frontend
name: Install
command: npm -q ci
lint:
type: steps
description: Check the codebase against style guidelines.
default:
- run:
name: Lint
command: make lint-frontend
command: npm run lint
build:
type: steps
description: Build the front-end components.
default:
- run:
name: Build
command: make build-frontend
unit-test:
type: steps
description: Run the front-end unit tests.
default: []
command: npm run build
cache-version:
description: An optional version number for cache dependencies, e.g. v1
type: string
Expand All @@ -61,12 +56,9 @@ steps:
- ~/.npm
- steps: <<parameters.lint>>
- steps: <<parameters.build>>
- steps: <<parameters.unit-test>>
- persist_to_workspace:
root: /data
paths:
- app/styleguide
- <<parameters.storybook_path>>
- <<parameters.library_path>>
- <<parameters.theme_path>>/css
- <<parameters.theme_path>>/js
- node_modules
7 changes: 0 additions & 7 deletions src/jobs/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ description: |
The following Make targets will be called by default:
- deploy
- test-init
- ci-nightwatch

The default test step assumes you have installed the
https://packagist.org/packages/previousnext/phpunit-finder package.
Expand Down Expand Up @@ -37,9 +36,6 @@ parameters:
- run:
name: "Test: Application"
command: for i in `./bin/phpunit-finder | circleci tests split --split-by=timings`; do /bin/bash -c "./bin/phpunit $i --log-junit $(pwd)/build/logs/phpunit/$(basename $i).xml"; done
- run:
name: "Test: Nightwatch"
command: make ci-nightwatch
post-test:
type: steps
description: Provide any optional post-test steps you would like to run.
Expand Down Expand Up @@ -69,7 +65,4 @@ steps:
- store_artifacts:
path: app/sites/simpletest
destination: tr1
- store_artifacts:
path: build/logs/nightwatch
destination: tr1
- steps: <<parameters.post-test>>