Skip to content

Commit

Permalink
feat(stryker): enable dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinezanardi committed Jun 19, 2023
1 parent c0f6c7f commit 73430e6
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 42 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ jobs:
mutant-tests:
name: Mutant Tests 👽
runs-on: ubuntu-latest
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
VERSION: ${{ github.head_ref }}
needs:
- install
steps:
Expand Down Expand Up @@ -195,4 +198,4 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
36 changes: 36 additions & 0 deletions config/stryker/stryker.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const reporters = ["clear-text", "progress", "html", "json"];

if (process.env.STRYKER_DASHBOARD_API_KEY !== undefined) {
reporters.push("dashboard");
}

module.exports = {
cleanTempDir: "always",
incremental: true,
incrementalFile: "tests/stryker/incremental.json",
checkers: ["typescript"],
tsconfigFile: "tsconfig.json",
testRunner: "jest",
ignoreStatic: true,
mutate: [
"src/**/*.ts",
"!**/*.dto.ts",
"!**/*.schema.ts",
"!**/*.constant.ts",
],
jest: { configFile: "config/jest/jest-global.ts" },
reporters,
htmlReporter: { fileName: "tests/stryker/coverage/index.html" },
jsonReporter: { fileName: "tests/stryker/coverage/mutation.json" },
thresholds: {
high: 100,
low: 100,
break: 100,
},
disableTypeChecks: "{test,src,lib}/**/*.{js,ts,jsx,tsx,html,vue}",
dashboard: {
project: "github.com/antoinezanardi/werewolves-assistant-api-next",
baseUrl: "https://dashboard.stryker-mutator.io/api/reports",
reportType: "full",
},
};
39 changes: 0 additions & 39 deletions config/stryker/stryker.conf.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"test": "NODE_ENV=test jest --config config/jest/jest-global.ts",
"test:watch": "NODE_ENV=test jest --watch --config config/jest/jest-global.ts",
"test:cov": "NODE_ENV=test jest --coverage --config config/jest/jest-global.ts",
"test:stryker": "NODE_ENV=test rimraf tests/stryker/coverage && stryker run config/stryker/stryker.conf.json",
"test:stryker:force": "NODE_ENV=test rimraf tests/stryker/incremental.json tests/stryker/coverage && stryker run config/stryker/stryker.conf.json --force",
"test:stryker": "NODE_ENV=test rimraf tests/stryker/coverage && stryker run config/stryker/stryker.conf.js",
"test:stryker:force": "NODE_ENV=test rimraf tests/stryker/incremental.json tests/stryker/coverage && stryker run config/stryker/stryker.conf.js --force",
"test:unit": "NODE_ENV=test jest --config config/jest/jest-unit.ts",
"test:unit:watch": "NODE_ENV=test jest --watch --config config/jest/jest-unit.ts",
"test:unit:cov": "NODE_ENV=test rimraf tests/unit/coverage && jest --coverage --config config/jest/jest-unit.ts",
Expand Down

0 comments on commit 73430e6

Please sign in to comment.