Skip to content

Commit

Permalink
fix: stryker threshold is too low, causing master build to fail #68 (#69
Browse files Browse the repository at this point in the history
)
  • Loading branch information
regevbr authored Apr 22, 2020
1 parent 8c51e65 commit 04f2b42
Show file tree
Hide file tree
Showing 8 changed files with 470 additions and 1,081 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ jobs:
- name: Run mutation tests
if: matrix.node-version == env.PRIMARY_NODE_VERSION && matrix.os == env.PRIMARY_OS && github.ref == 'refs/heads/master'
run: yarn run mutation-test
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

- name: Upload mutation reports artifact
if: matrix.node-version == env.PRIMARY_NODE_VERSION && matrix.os == env.PRIMARY_OS && github.ref == 'refs/heads/master'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ node_modules/
build/
dist/
jspm_packages/
!/tools
!/tools/**/*.js
**/*.js.map
**/*.js
**/*.d.ts
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ typings/

# next.js build output
.next

tools/
/tsconfig.build.json
/tsconfig.test.json
/jest.config.js
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,38 +81,38 @@
"@types/cross-spawn": "^6.0.1",
"@types/jest": "^25.2.1",
"@types/jest-when": "^2.7.1",
"@types/node": "^13.13.0",
"@types/node": "^13.13.2",
"@types/node-fetch": "^2.5.6",
"@types/pacote": "^11.1.0",
"@types/semver": "^7.1.0",
"@types/shell-quote": "^1.6.1",
"@types/tmp": "^0.1.0",
"@types/yaml": "^1.2.0",
"@types/yargs-parser": "^15.0.0",
"@typescript-eslint/eslint-plugin": "^2.28.0",
"@typescript-eslint/parser": "^2.28.0",
"@typescript-eslint/eslint-plugin": "^2.29.0",
"@typescript-eslint/parser": "^2.29.0",
"all-contributors-cli": "^6.14.2",
"cspell": "^4.0.57",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-prefer-arrow": "^1.2.0",
"eslint-plugin-prettier": "^3.1.3",
"expect": "^25.3.0",
"expect": "^25.4.0",
"generate-changelog": "^1.8.0",
"husky": "^4.2.5",
"jest": "^25.3.0",
"jest": "^25.4.0",
"jest-mock-extended": "^1.0.8",
"jest-serial-runner": "^1.1.0",
"jest-serial-runner": "file:./tools/jest-serial-runner",
"jest-when": "^2.7.1",
"lint-staged": "^10.1.6",
"lint-staged": "^10.1.7",
"mock-spawn": "^0.2.6",
"node-fetch": "^2.6.0",
"npm-check-updates": "^4.1.2",
"prettier": "^2.0.4",
"prettier": "^2.0.5",
"semver": "^7.3.2",
"ts-jest": "^25.4.0",
"ts-node": "^8.8.2",
"ts-node": "^8.9.0",
"ts-toolbelt": "^6.5.1",
"typescript": "^3.8.3"
},
Expand All @@ -133,7 +133,7 @@
"tmp": "~0.1.0",
"ts-type-guards": "~0.6.1",
"typeorm": "~0.2.24",
"yaml": "~1.9.1",
"yaml": "~1.9.2",
"yargs-parser": "~18.1.3"
}
}
4 changes: 2 additions & 2 deletions stryker.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const config = {
maxConcurrentTestRunners: 4,
thresholds: {
high: 90,
low: 70,
break: 70,
low: 60,
break: 60,
},
jest: {
projectType: 'custom',
Expand Down
11 changes: 11 additions & 0 deletions tools/jest-serial-runner/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const TestRunner = require(`jest-runner`);

class SerialRunner extends TestRunner {
constructor(...attr) {
super(...attr);
this.isSerial = true;
}
}

module.exports = SerialRunner;
5 changes: 5 additions & 0 deletions tools/jest-serial-runner/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "jest-serial-runner",
"version": "2.0.0",
"main": "index.js"
}
Loading

0 comments on commit 04f2b42

Please sign in to comment.