mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Updated travis to run mutations on changed files only
This commit is contained in:
parent
b83c0e0aba
commit
32f171d861
4 changed files with 14 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
build:
|
||||
environment:
|
||||
node: v10.4.1
|
||||
node: v10.15.3
|
||||
tools:
|
||||
external_code_coverage: true
|
||||
external_code_coverage:
|
||||
timeout: 1200
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue