Skip to content

Commit

Permalink
ci: migrate build system to CircleCI version 2. (vuejs#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoguiec authored and ktsn committed Sep 1, 2018
1 parent a9bd047 commit b205e9f
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 266 deletions.
94 changes: 94 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
version: 2

defaults: &defaults
working_directory: ~/vuex
docker:
- image: circleci/node:8-browsers

jobs:
install:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-vuex-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-vuex-{{ .Branch }}
- v1-vuex
- run:
name: Installing Dependencies
command: yarn
- save_cache:
paths:
- ./node_modules
key: v1-vuex-{{ .Branch }}-{{ checksum "yarn.lock" }}
- persist_to_workspace:
root: ~/
paths:
- vuex

lint-types:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Linting
command: |
yarn lint --format junit --output-file test-results/eslint/results.xml
- run:
name: Testing Types
command: |
yarn test:types
- store_test_results:
path: test-results
- store_artifacts:
path: test-results

test-unit:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Running Unit Tests
command: |
yarn test:unit
test-e2e:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Running End-to-end Tests
command: |
yarn test:e2e
test-ssr:
<<: *defaults
steps:
- attach_workspace:
at: ~/
- run:
name: Running Server-side Rendering Tests
command: |
yarn test:ssr
workflows:
version: 2
install-and-parallel-test:
jobs:
- install
- lint-types:
requires:
- install
- test-unit:
requires:
- install
- test-e2e:
requires:
- install
- test-ssr:
requires:
- install
5 changes: 0 additions & 5 deletions circle.yml

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"cross-env": "^5.2.0",
"cross-spawn": "^5.0.1",
"css-loader": "^0.28.7",
"eslint": "^3.19.0",
"eslint-plugin-vue-libs": "^1.2.0",
"eslint": "^4.13.1",
"eslint-plugin-vue-libs": "^2.0.1",
"express": "^4.14.1",
"jasmine": "2.8.0",
"jasmine-core": "2.8.0",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/cart.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
'shopping cart': function (browser) {
browser
.url('http://localhost:8080/shopping-cart/')
.url('http://localhost:8080/shopping-cart/')
.waitForElementVisible('#app', 1000)
.waitFor(120) // api simulation
.assert.count('li', 3)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/counter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
'counter': function (browser) {
browser
.url('http://localhost:8080/counter/')
.url('http://localhost:8080/counter/')
.waitForElementVisible('#app', 1000)
.assert.containsText('div', 'Clicked: 0 times')
.click('button:nth-child(1)')
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/todomvc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
'todomvc': function (browser) {
browser
.url('http://localhost:8080/todomvc/')
.url('http://localhost:8080/todomvc/')
.waitForElementVisible('.todoapp', 1000)
.assert.notVisible('.main')
.assert.notVisible('.footer')
Expand Down
Loading

0 comments on commit b205e9f

Please sign in to comment.