Repository navigation
test: add mutation testing and mutation score badge - #11253
Conversation
This reverts commit 3643e74.
|
I would at least keep the latest Postgres (has the most tests) and maybe the latest MariaDB or MySQL and one of the SQLite tests. Would removing the CLI test (it's a GitHub issue test) from mutation testing at least be helpful? It takes quite a long time. |
It runs it only when necessary - if mutant is not covered by the test, the test is not run. |
| "@eslint/js": "^9.39.1", | ||
| "@google-cloud/spanner": "^8.3.1", | ||
| "@sap/hana-client": "^2.26.26", | ||
| "@stryker-mutator/core": "^8.7.1", |
There was a problem hiding this comment.
I think we can use ^9.4.0 since we already dropped node 18. It would also remove a lot of duplicate packages from the lockfile too ;)
If you switch to the new version: git fetch upstream && git checkout upstream/master -- pnpm-lock.yaml && pnpm install to avoid any leftovers in the lockfile (provided that upstream is typeorm/typeorm).
There was a problem hiding this comment.
I've updated the lock file, check again please
| @@ -0,0 +1,13 @@ | |||
| { | |||
| "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json", | |||
| "packageManager": "npm", | |||
There was a problem hiding this comment.
We switched to pnpm, can we update this and the workflow too? :)
|
|
||
| - run: npm ci | ||
| - run: cp .github/workflows/test/mutation-testing.ormconfig.json ormconfig.json | ||
| - run: npx stryker run |
There was a problem hiding this comment.
pnpm exec stryker run (pnpx will download the latest stryker version from npm instead of using the one in the repo)
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v6 |
There was a problem hiding this comment.
You need to setup pnpm before setting up node. Check the other workflows.
| { | ||
| "$schema": "./node_modules/@stryker-mutator/core/schema/stryker-schema.json", | ||
| "packageManager": "pnpm", | ||
| "buildCommand": "npm run compile", |
Co-authored-by: Lucian Mocanu <[email protected]> Co-authored-by: Giorgio Boa <[email protected]>
Co-authored-by: Lucian Mocanu <[email protected]> Co-authored-by: Giorgio Boa <[email protected]>
Co-authored-by: Lucian Mocanu <[email protected]> Co-authored-by: Giorgio Boa <[email protected]>
Description of change
Adds mutations testing, the thing that shows the quality of our tests.
There will be a GitHub Action that runs once a month with the most databases it can handle and upload a report to the Stryker's Dashboard.
API key needs to be configured via enabling the repository in the Dashboard and added to the secrets for the repo.
Example badge is in this repo: https://github.com/OSA413/typeorm/
Example report is here: https://dashboard.stryker-mutator.io/reports/github.com/OSA413/typeorm/mutation-testing
Pull-Request Checklist
masterbranchnpm run formatto apply prettier formattingnpm run testpasses with this changeFixes #0000