From b3a27f7c0dbc948a4732e2c3b349a6354a58f389 Mon Sep 17 00:00:00 2001 From: Thomas Allmer Date: Fri, 26 Apr 2019 13:38:42 +0200 Subject: [PATCH] chore: enable circleci --- .circleci/config.yml | 67 ++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 3 ++ karma.bs.config.js | 13 +++++++-- 3 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..278011116 --- /dev/null +++ b/.circleci/config.yml @@ -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 diff --git a/.gitignore b/.gitignore index e81c70eaa..f8f46dd08 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ ## temp folders /.tmp/ /coverage/ + +## temp files +local.log diff --git a/karma.bs.config.js b/karma.bs.config.js index f92abde4b..8a6981371 100644 --- a/karma.bs.config.js +++ b/karma.bs.config.js @@ -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; };