Skip to content

Commit

Permalink
Add CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi committed Nov 24, 2019
1 parent 05be6c9 commit 9ee47eb
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/tests-puppeteer.yml
@@ -0,0 +1,32 @@
name: Puppeteer & A11y tests

on: [push]

jobs:
build:

name: Puppeteer & A11y tests
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: install, bootstrap
run: |
yarn bootstrap --core
- name: build storybook
run: |
yarn --cwd examples/official-storybook build-storybook
- name: test
run: |
yarn test --puppeteer
4 changes: 1 addition & 3 deletions examples/official-storybook/package.json
Expand Up @@ -54,15 +54,13 @@
"lodash": "^4.17.15",
"paths.macro": "^2.0.2",
"prop-types": "^15.7.2",
"puppeteer": "^2.0.0",
"react": "^16.8.3",
"react-dom": "^16.8.3",
"storybook-chromatic": "^3.0.0",
"terser-webpack-plugin": "^2.1.2",
"ts-loader": "^6.0.0",
"uuid": "^3.3.2",
"webpack": "^4.33.0"
},
"optionalDependencies": {
"puppeteer": "^2.0.0"
}
}
2 changes: 1 addition & 1 deletion lib/api/src/version.ts
@@ -1 +1 @@
export const version = '5.3.0-beta.5';
export const version = '5.3.0-beta.6';
8 changes: 4 additions & 4 deletions scripts/test.js
Expand Up @@ -50,11 +50,11 @@ const tasks = {
projectLocation: '<all>',
isJest: true,
}),
image: createProject({
name: `Image snapshots for Official storybook ${chalk.gray('(image)')}`,
puppeteer: createProject({
name: `Puppeteer and A11y tests for Official storybook ${chalk.gray('(puppeteer)')}`,
defaultValue: false,
option: '--image',
projectLocation: path.join(__dirname, '..', 'examples/official-storybook/image-snapshots'),
option: '--puppeteer',
projectLocation: path.join(__dirname, '..', 'examples/official-storybook/storyshots-puppeteer'),
isJest: true,
}),
cli: createProject({
Expand Down

0 comments on commit 9ee47eb

Please sign in to comment.