Skip to content

Commit

Permalink
chore: convert to jest (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
unional authored Jun 5, 2019
1 parent e58cdfe commit 82ac76a
Show file tree
Hide file tree
Showing 12 changed files with 5,869 additions and 1,429 deletions.
124 changes: 124 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
version: 2
workflows:
version: 2
all:
jobs:
- node-latest
- node10:
requires:
- node-latest
- node9:
requires:
- node-latest
- node8:
requires:
- node-latest
- node6:
requires:
- node-latest
# - size-limit:
# requires:
# - node-latest
- release:
filters:
branches:
only: master
requires:
- node-latest
- node10
- node9
- node8
- node6
jobs:
local:
docker:
- image: circleci/node:11
steps:
- checkout
- run: npm run verify
node-latest:
docker:
- image: circleci/node:11
steps:
- checkout
- restore_cache:
name: Restore node_modules cache
key: node_modules-{{ checksum "package-lock.json" }}
- run:
name: Install Dependencies
command: |
if [ ! -d node_modules ]; then
npm ci
npm i --no-save jest-junit
fi
- save_cache:
name: Save node modules cache
key: node_modules-{{ checksum "package-lock.json" }}
paths:
- node_modules
- persist_to_workspace:
root: '.'
paths:
- node_modules
- run: npm run verify
- run: npx codecov
- store_test_results:
path: .reports/junit
node10:
docker:
- image: 'circleci/node:9'
steps:
- checkout
- attach_workspace:
at: '.'
- run: npm run verify
- store_test_results:
path: .reports/junit
node9:
docker:
- image: 'circleci/node:9'
steps:
- checkout
- attach_workspace:
at: '.'
- run: npm run verify
- store_test_results:
path: .reports/junit
node8:
docker:
- image: 'circleci/node:8'
steps:
- checkout
- attach_workspace:
at: '.'
- run: npm run verify
- store_test_results:
path: .reports/junit
node6:
docker:
- image: 'circleci/node:6'
steps:
- checkout
- attach_workspace:
at: '.'
- run: npm run verify
- store_test_results:
path: .reports/junit
size-limit:
docker:
- image: 'circleci/node:latest-browsers'
steps:
- checkout
- attach_workspace:
at: '.'
- run: npm run build
- run: npm run size
release:
docker:
- image: circleci/node:11
steps:
- checkout
- attach_workspace:
at: '.'
- run: npm run build
- run: npx semantic-release
2 changes: 2 additions & 0 deletions .progress/test.results
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"d":13313,"f":4,"fs":2,"p":26,"ps":1,"t":30,"ts":3,"s":1559722204294,"c":{"b":{"c":19,"s":0,"t":21,"p":90.48},"f":{"c":17,"s":0,"t":18,"p":94.44},"l":{"c":63,"s":0,"t":72,"p":87.5},"s":{"c":71,"s":0,"t":82,"p":86.59}}}
{"d":7590,"f":0,"fs":0,"p":30,"ps":3,"t":30,"ts":3,"s":1559722320266,"c":{"b":{"c":19,"s":0,"t":21,"p":90.48},"f":{"c":17,"s":0,"t":18,"p":94.44},"l":{"c":63,"s":0,"t":72,"p":87.5},"s":{"c":71,"s":0,"t":82,"p":86.59}}}
21 changes: 6 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
language: node_js
sudo: false
cache:
directories:
- ~/.npm
notifications:
email: false

node_js:
- '11'
- '10'
- '9'
- '8'

- '6'
branches:
only:
- master
- /^greenkeeper.*$/

before_install:
- npm install -g greenkeeper-lockfile@1

before_script: greenkeeper-lockfile-update

script:
- npm i --no-save jest-junit
- npm run verify

after_script: greenkeeper-lockfile-upload

after_success:
- npm install --no-save coveralls && npm run coveralls
- npm run semantic-release
- ./scripts/run-on-node-version.sh 11 "npm install -g codacy-coverage && cat ./coverage/lcov.info | codacy-coverage"
- ./scripts/run-on-node-version.sh 11 "npm install -g coveralls && cat ./coverage/lcov.info | coveralls"
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const common = require('@unional/devpkg-node/simple/config/jest.common')
module.exports = Object.assign(common, {
})
Loading

0 comments on commit 82ac76a

Please sign in to comment.