chore: enable circleci

This commit is contained in:
Thomas Allmer 2019-04-26 13:38:42 +02:00
parent 7df05820e8
commit b3a27f7c0d
3 changed files with 81 additions and 2 deletions

67
.circleci/config.yml Normal file
View file

@ -0,0 +1,67 @@
# 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:10.12.0-browsers
jobs:
test:
<<: *defaults
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v3-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v3-dependencies-
- run: yarn install --frozen-lockfile
- save_cache:
paths:
- node_modules
key: v2-dependencies-{{ checksum "package.json" }}
# run lint
- run: npm run lint
# run tests
- run: npm run test:bs
- persist_to_workspace:
root: ~/repo
paths: .
# deploy:
# <<: *defaults
# steps:
# # will add github as known host
# - checkout
# - attach_workspace:
# at: ~/repo
# - add_ssh_keys:
# fingerprints:
# - "3f:ea:54:b7:77:13:b6:cf:29:90:2b:19:bb:eb:b5:f1"
# - run:
# name: Authenticate with registry
# command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
# - run: git config --global user.email circleci@circleci
# - run: git config --global user.name CircleCI
# - run:
# name: Publish package
# command: "./node_modules/.bin/lerna publish --message 'chore: release new versions' --yes"
workflows:
version: 2
test-deploy:
jobs:
- test
# - deploy:
# requires:
# - test
# filters:
# branches:
# only: master

3
.gitignore vendored
View file

@ -21,3 +21,6 @@
## temp folders
/.tmp/
/coverage/
## temp files
local.log

View file

@ -5,12 +5,21 @@ const createBaseConfig = require('./karma.conf.js');
module.exports = config => {
config.set(
merge(bsSettings(config), createBaseConfig(config), {
merge.strategy({
browsers: 'replace',
})(bsSettings(config), createBaseConfig(config), {
browserStack: {
project: 'lion',
},
browsers: [
'bs_win10_chrome_latest',
// Only chrome for now
// 'bs_win10_firefox_latest',
// 'bs_win10_edge_latest',
// 'bs_osxmojave_safari_latest',
// 'bs_win10_ie_11',
],
}),
);
return config;
};