Skip to content

Commit

Permalink
feat(ci): add minimum ci to run test on branches
Browse files Browse the repository at this point in the history
* add ci config

* change version of node

* make sure is buidling before running tests

* update npm commands

* add puppeteer env variables

* add flag to chrome headless

* update arguments for headless browser

* config again

* change node version
  • Loading branch information
uittorio authored Apr 7, 2019
1 parent 501b02f commit 34d4ac7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:latest-browsers
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: npm run build
- run: npm run test-transformer
- run: npm run test-framework
9 changes: 8 additions & 1 deletion config/karma/karma.config.base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpackConfig = require('./../webpack.test.js');
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function(config, url) {
return {
Expand All @@ -25,8 +26,14 @@ module.exports = function(config, url) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
customLaunchers: {
Chrome_no_sandbox: {
base: 'Chrome',
flags: ['--headless', '--no-sandbox']
}
},
browsers: ['ChromeHeadless'],
singleRun: true
}

};
};

0 comments on commit 34d4ac7

Please sign in to comment.