Skip to content

Commit

Permalink
Merge pull request #85 from ckeditor/i/81
Browse files Browse the repository at this point in the history
Internal: Added integration with `Coveralls.io` service. Closes #81.
  • Loading branch information
psmyrek committed Dec 30, 2021
2 parents ad3c16e + 77d4046 commit d6529ad
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ before_install:
install:
- yarn install
script:
- yarn run test
- yarn run coverage
- node scripts/ci/travis-check.js
after_success:
- yarn add coveralls --ignore-workspace-root-check
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CKEditor 5 Package Generator
========================

[![Build Status](https://app.travis-ci.com/ckeditor/ckeditor5-package-generator.svg?branch=master)](https://app.travis-ci.com/ckeditor/ckeditor5-package-generator)
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5-package-generator/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5-package-generator?branch=master)

This repository follows the mono-repository structure. It contains multiple npm packages.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"scripts": {
"changelog": "node scripts/release/changelog.js",
"coverage": "nyc --reporter=lcov --reporter=text-summary npm run test",
"coverage": "nyc --check-coverage --branches=100 --functions=100 --lines=100 --statements=100 --reporter=lcov --reporter=text-summary npm run test",
"lint": "eslint --quiet \"**/*.js\"",
"precommit": "lint-staged",
"release:bump-version": "node scripts/release/bump-versions.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = options => {
logLevel: 'INFO',

browsers: [
process.env.CI ? 'CHROME_TRAVIS_CI' : 'CHROME_LOCAL'
process.env.CI === 'true' ? 'CHROME_TRAVIS_CI' : 'CHROME_LOCAL'
],

customLaunchers: {
Expand Down
11 changes: 11 additions & 0 deletions packages/ckeditor5-package-tools/tests/utils/get-karma-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ describe( 'lib/utils/get-karma-config', () => {
expect( config.frameworks ).to.contain( 'webpack' );
} );

it( 'uses sandboxed version of Chrome when executing on local environment', () => {
const envCI = process.env.CI;
process.env.CI = false;

const config = getKarmaConfig( { cwd } );

expect( config.browsers ).to.deep.equal( [ 'CHROME_LOCAL' ] );

process.env.CI = envCI;
} );

it( 'uses no sandbox version of Chrome when executing on CI', () => {
const envCI = process.env.CI;
process.env.CI = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ describe( 'lib/utils/get-webpack-config-server', () => {
} );
} );

it( 'defines the development mode by default for an HTTP server', () => {
const config = getWebpackConfigServer( { cwd } );

expect( config.mode ).to.equal( 'development' );
} );

it( 'defines the production mode for an HTTP server', () => {
const config = getWebpackConfigServer( { cwd, production: true } );

expect( config.mode ).to.equal( 'production' );
} );

describe( 'sample language', () => {
it( 'passes the specified language directly to source file', () => {
getWebpackConfigServer( { cwd, language: 'en' } );
Expand Down

0 comments on commit d6529ad

Please sign in to comment.