Skip to content

Commit

Permalink
Enable flow and unit tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed May 26, 2020
1 parent 176f476 commit e73f7a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ jobs:
# run tests!
#- run: yarn test
- run: yarn lint
#- run: yarn flow
# https://discuss.circleci.com/t/circleci-terminal-is-a-tty-but-term-is-not-set/9965/8
- run: TERM=dumb yarn flow
- run: yarn test:types
- run: yarn test:cover
- run: yarn test:unit:ci
- run: yarn test:e2e
- run: yarn run coverage && bash <(curl -s https://codecov.io/bash)
- run: yarn run coverage && bash <(curl -s https://codecov.io/bash)
13 changes: 13 additions & 0 deletions config/karma.unit.ci.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const base = require('./karma.base.conf')

module.exports = config => {
config.set(Object.assign(base, {
browsers: ['Chrome', 'Firefox'],
reporters: ['progress'],
singleRun: true,
plugins: base.plugins.concat([
'karma-chrome-launcher',
'karma-firefox-launcher',
])
}))
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@
"test:cover": "cross-env BABEL_ENV=test karma start config/karma.cover.conf.js",
"test:e2e": "npm run build && node test/e2e/runner.js",
"test:types": "tsc -p types",
"test:unit": "cross-env BABEL_ENV=test karma start config/karma.unit.conf.js"
"test:unit": "cross-env BABEL_ENV=test karma start config/karma.unit.conf.js",
"test:unit:ci": "cross-env BABEL_ENV=test karma start config/karma.unit.ci.conf.js"
},
"sideEffects": false,
"types": "types/index.d.ts",
Expand Down

0 comments on commit e73f7a5

Please sign in to comment.