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

Commit 12bb39c

Browse files
committed
Add CI for smoke-test
- Temporary fix #10
1 parent bf75c1e commit 12bb39c

File tree

4 files changed

+85
-9
lines changed

4 files changed

+85
-9
lines changed

.circleci/config.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
7+
defaults: &defaults
8+
docker:
9+
- image: circleci/node:latest
10+
11+
jobs:
12+
init:
13+
<<: *defaults
14+
working_directory: ~/repo
15+
steps:
16+
- checkout
17+
- run: sudo apt-get install expect
18+
# Download and cache dependencies
19+
- restore_cache:
20+
keys:
21+
- v1-dependencies-\{{ checksum "package.json" }}
22+
# fallback to using the latest cache if no exact match is found
23+
- v1-dependencies-
24+
- run:
25+
name: install dependency
26+
command: yarn
27+
- save_cache:
28+
paths:
29+
- node_modules
30+
key: v1-dependencies-\{{ checksum "package.json" }}
31+
32+
- run:
33+
name: auto generate project using this template
34+
command: chmod +x test.sh; ./test.sh
35+
- persist_to_workspace:
36+
root: ~/repo
37+
paths:
38+
- vue-authoring-demo/*
39+
40+
build:
41+
<<: *defaults
42+
working_directory: ~/repo/vue-authoring-demo
43+
steps:
44+
- attach_workspace:
45+
at: ~/repo
46+
- run: yarn build:component
47+
- run: yarn build:storybook
48+
49+
smoke-test:
50+
<<: *defaults
51+
working_directory: ~/repo/vue-authoring-demo
52+
steps:
53+
- attach_workspace:
54+
at: ~/repo
55+
- run: yarn dev -- --smoke-test
56+
57+
workflows:
58+
version: 2
59+
smoke_test:
60+
jobs:
61+
- init
62+
- build:
63+
requires:
64+
- init
65+
- smoke-test:
66+
requires:
67+
- init

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# vue-authoring-template
2-
<!-- [![CircleCI](https://circleci.com/gh/DrSensor/vue-authoring-template.svg?style=shield)](https://circleci.com/gh/DrSensor/vue-authoring-template) -->
2+
[![CircleCI](https://circleci.com/gh/DrSensor/vue-authoring-template.svg?style=shield)](https://circleci.com/gh/DrSensor/vue-authoring-template)
3+
34
<sub>Click one of this badge for more info</sub>
45

56
[![circleci support](https://img.shields.io/badge/circleci-support-blue.svg?maxAge=2592000&style=flat-square)](https://circleci.com/docs/1.0/npm-continuous-deployment/)

meta.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ module.exports = {
116116
value: false,
117117
short: 'no'
118118
}
119-
]
119+
],
120+
default: 'yarn'
120121
}
121122
},
122123
filters: {

test.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
set -e
1+
#!/usr/bin/env expect
2+
set timeout 360
23

3-
yes "" | ./node_modules/.bin/vue init . test
4+
spawn ./node_modules/.bin/vue init . vue-authoring-demo
45

5-
cd test
6-
npm install
7-
npm run lint
8-
npm test
9-
npm run build
6+
# This happens because of
7+
# https://github.com/vuejs/vue-cli/issues/291
8+
expect "Project name" { send "\n" }
9+
expect "Project description" { send "\n" }
10+
expect "Author" { send "\n" }
11+
expect "Select which storybook-addon you want to add" { send "\n" }
12+
expect "Add circleci for Continuos Build?" { send "\n" }
13+
expect "Configure circleci for Continuos Deployment" { send "\n" }
14+
expect "Sort story and scenario in alphabetical order?" { send "\n" }
15+
expect "Yes, use Yarn" { send "\n" }
16+
expect eof

0 commit comments

Comments
 (0)