diff --git a/src/jobs/build_frontend.yml b/src/jobs/build_frontend.yml index 9e34611..b80fb91 100644 --- a/src/jobs/build_frontend.yml +++ b/src/jobs/build_frontend.yml @@ -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. @@ -65,7 +69,7 @@ steps: - persist_to_workspace: root: /data paths: - - app/styleguide + - <> - <> - <>/css - <>/js diff --git a/src/jobs/test_frontend.yml b/src/jobs/test_frontend.yml new file mode 100644 index 0000000..a389059 --- /dev/null +++ b/src/jobs/test_frontend.yml @@ -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: <> + +steps: + - checkout + - attach_workspace: + at: /data + - run: + name: "Test" + command: npm run test:ci diff --git a/src/jobs/test_storybook.yml b/src/jobs/test_storybook.yml new file mode 100644 index 0000000..54775d3 --- /dev/null +++ b/src/jobs/test_storybook.yml @@ -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 \ No newline at end of file