Skip to content

Commit

Permalink
Merge pull request #2557 from storybooks/CI-angular
Browse files Browse the repository at this point in the history
CI: test that angular example works
  • Loading branch information
ndelangen authored Dec 24, 2017
2 parents e485708 + 52fc7fc commit 89d8801
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ jobs:
command: |
cd examples/vue-kitchen-sink
yarn build-storybook
- run:
name: "Build angular-cli"
command: |
cd examples/angular-cli
yarn build-storybook
- run:
name: "Run react kitchen-sink"
Expand All @@ -81,6 +86,12 @@ jobs:
cd examples/vue-kitchen-sink
yarn storybook
background: true
- run:
name: "Run angular-cli"
command: |
cd examples/angular-cli
yarn storybook
background: true
- run:
name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
command: sh ./scripts/workaround-puppeteer-issue-290.sh
Expand Down
5 changes: 5 additions & 0 deletions examples/angular-cli/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import { configure } from '@storybook/angular';

function loadStories() {
// put welcome screen at the top of the list so it's the first one displayed
require('../src/stories');

// automatically import all story ts files that end with *.stories.ts
const req = require.context('../src/stories', true, /\.stories\.ts$/)
req.keys().forEach((filename) => req(filename))
}

configure(loadStories, module);
2 changes: 1 addition & 1 deletion examples/angular-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"storybook": "start-storybook -p 9009 -s src/assets",
"storybook": "start-storybook -p 9008 -s src/assets",
"build-storybook": "build-storybook -s src"
},
"private": true,
Expand Down
2 changes: 0 additions & 2 deletions examples/angular-cli/src/stories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import { ServiceComponent } from './moduleMetadata/service.component'
import { NameComponent } from './name.component';
import { CustomPipePipe } from './custom.pipe';

import './customControlValueAccessor/custom-cva-component.stories';

storiesOf('Welcome', module)
.add('to Storybook', () => ({
component: Welcome,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions integration/examples.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const examples = [
name: 'vue-kitchen-sink',
port: 9009,
},
{
name: 'angular-cli',
port: 9008,
},
];

examples.forEach(({ name, port }) => {
Expand Down

0 comments on commit 89d8801

Please sign in to comment.