Skip to content

Commit e3aaab0

Browse files
Initial support of mutation testing with stryker-js (#3591)
1 parent 0dc2d20 commit e3aaab0

8 files changed

+1921
-6
lines changed

.c8rc.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"src/utilities/typedQueryDocumentNode.ts"
1111
],
1212
"clean": true,
13-
"temp-directory": "coverage",
14-
"report-dir": "coverage",
13+
"report-dir": "reports/coverage",
1514
"skip-full": true,
1615
"reporter": ["html", "text"],
1716
"check-coverage": true,

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Copied from '.gitignore', please keep it in sync.
22
/.eslintcache
33
/.docusaurus
4+
/.stryker-tmp
45
/node_modules
5-
/coverage
6+
/reports
67
/npmDist
78
/denoDist
89
/websiteDist
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Mutation Testing
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *' # run once every day at 00:00 UTC
6+
jobs:
7+
lint:
8+
name: Run mutation testing
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v2
13+
with:
14+
persist-credentials: false
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
cache: npm
20+
node-version-file: '.node-version'
21+
22+
- name: Install Dependencies
23+
run: npm ci --ignore-scripts
24+
25+
- name: Run mutation testing
26+
run: npm run testonly:mutate
27+
28+
- name: Upload mutation testing report
29+
uses: actions/upload-artifact@v2
30+
with:
31+
name: mutationTestingReport
32+
path: ./reports/mutation/mutation.html

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
/.eslintcache
1010
/.cspellcache
1111
/.docusaurus
12+
/.stryker-tmp
1213
/node_modules
13-
/coverage
14+
/reports
1415
/npmDist
1516
/denoDist
1617
/websiteDist

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
/diff-npm-package.html
33
/.eslintcache
44
/.docusaurus
5+
/.stryker-tmp
56
/node_modules
6-
/coverage
7+
/reports
78
/npmDist
89
/denoDist
910
/websiteDist

0 commit comments

Comments
 (0)