Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Add CI for smoke-test
Browse files Browse the repository at this point in the history
- Temporary fix #10
  • Loading branch information
DrSensor committed Jan 24, 2018
1 parent bf75c1e commit 0488132
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 8 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2

defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:latest

jobs:
init:
<<: *defaults
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-\{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: install dependency
command: yarn
- save_cache:
paths:
- node_modules
key: v1-dependencies-\{{ checksum "package.json" }}

- run:
name: auto generate project using this template
command: ./test.sh
- persist_to_workspace:
root: ~/repo
paths:
- vue-authoring-demo

build:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo/vue-authoring-demo
- run: yarn build:component
- run: yarn build:storybook

smoke-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo/vue-authoring-demo
- run: yarn dev -- --smoke-test

workflows:
version: 2
smoke_test:
jobs:
- init
- build:
requires:
- init
- smoke-test:
requires:
- init
3 changes: 2 additions & 1 deletion meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ module.exports = {
value: false,
short: 'no'
}
]
],
default: 'yarn'
}
},
filters: {
Expand Down
20 changes: 13 additions & 7 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
set -e
#!/usr/bin/env expect
set timeout 360

yes "" | ./node_modules/.bin/vue init . test
spawn ./node_modules/.bin/vue init . vue-authoring-demo

cd test
npm install
npm run lint
npm test
npm run build
# This happens because of
# https://github.com/vuejs/vue-cli/issues/291
expect "Project name" { send "\n" }
expect "Project description" { send "\n" }
expect "Author" { send "\n" }
expect "Select which storybook-addon you want to add" { send "\n" }
expect "Add circleci for Continuos Build?" { send "\n" }
expect "Configure circleci for Continuos Deployment" { send "\n" }
expect "Sort story and scenario in alphabetical order?" { send "\n" }
expect "Should we run `npm install` for you after the project has been created? (recommended)" { send "\n" }

0 comments on commit 0488132

Please sign in to comment.