diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 3d6be607..0ce4aa46 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,5 +1,6 @@ build: environment: - node: v10.4.1 + node: v10.15.3 tools: - external_code_coverage: true + external_code_coverage: + timeout: 1200 diff --git a/.travis.yml b/.travis.yml index 4ca6d188..f257d0ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,11 +13,14 @@ services: install: - npm ci +before_script: + - export MUTATION_FILES=$(git diff ${TRAVIS_COMMIT_RANGE:-origin/master} --name-only | grep src/ | paste -sd ",") + script: - npm run lint - npm run test:ci - if [[ -z $TRAVIS_TAG ]]; then docker build -t shlink-web-client:test . ; fi - - if [[ -z $TRAVIS_TAG ]]; then npm run mutate ; fi + - if [[ -z $TRAVIS_TAG ]]; then npm run mutate:ci ; fi after_success: - node_modules/.bin/ocular coverage/clover.xml diff --git a/package.json b/package.json index 3f322fd4..b1582502 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "test": "node scripts/test.js --env=jsdom --colors", "test:ci": "npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=clover", "test:pretty": "npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary --coverageReporters=html", - "mutate": "./node_modules/.bin/stryker run" + "mutate": "./node_modules/.bin/stryker run", + "mutate:ci": "npm run mutate -- --mutate=$MUTATION_FILES" }, "dependencies": { "@fortawesome/fontawesome-free": "^5.6.3", diff --git a/stryker.conf.js b/stryker.conf.js index 120963da..c09a64cd 100644 --- a/stryker.conf.js +++ b/stryker.conf.js @@ -1,15 +1,10 @@ const jestConfig = require(`${__dirname}/jest.config.js`); -// reporters: clear-text - module.exports = (config) => config.set({ mutate: jestConfig.collectCoverageFrom, - mutator: { - name: 'javascript', - excludedMutations: [ 'BooleanSubstitution', 'StringLiteral' ], - }, + mutator: 'javascript', testRunner: 'jest', - reporters: [ 'progress' ], + reporters: [ 'progress', 'clear-text' ], coverageAnalysis: 'off', jest: { projectType: 'custom', @@ -21,4 +16,7 @@ module.exports = (config) => config.set({ low: 60, break: null, }, + clearTextReporter: { + logTests: false, + }, });