Skip to content

Commit dd76406

Browse files
committed
ci: set workflow
1 parent 906a540 commit dd76406

File tree

6 files changed

+33
-6
lines changed

6 files changed

+33
-6
lines changed

.github/workflows/main.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@ jobs:
1818
run: npm install
1919
- name: Build
2020
run: npx tsc
21-
- name: Convert
22-
run: npx junit-to-ctrf test.xml
21+
- name: Run against junit
22+
run: npm run run:junit
23+
- name: Run against minitest
24+
run: npm run run:minitest
25+
- name: Run against surefire
26+
run: npm run run:surefire
27+
- name: Run against glob
28+
run: npm run run:glob

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
"types": "dist/index.d.ts",
77
"scripts": {
88
"build": "npx tsc",
9-
"run:junit": "node dist/cli.js test-junit.xml",
10-
"run:minitest": "node dist/cli.js test-minitest-junit.xml",
11-
"run:surefire": "node dist/cli.js test-surefire.xml",
12-
"test": "echo \"Error: no test specified\" && exit 1"
9+
"run:junit": "node dist/cli.js reports/test-junit.xml --output reports/test-junit-ctrf.json",
10+
"run:minitest": "node dist/cli.js reports/test-minitest-junit.xml --output reports/test-minitest-junit-ctrf.json",
11+
"run:surefire": "node dist/cli.js reports/test-surefire.xml --output reports/test-surefire-ctrf.json",
12+
"run:glob": "node dist/cli.js \"reports/*.xml\" --output reports/test-glob-ctrf.json",
13+
"test": "jest",
14+
"test:e2e": "jest --config jest.config.js"
1315
},
1416
"bin": {
1517
"junit-to-ctrf": "./dist/cli.js"

reports/not-junit.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<catalog>
3+
<book id="bk101">
4+
<author>Stephen King</author>
5+
<title>The Shining</title>
6+
<genre>Horror</genre>
7+
<price>9.99</price>
8+
<publish_date>1977-01-28</publish_date>
9+
<description>A family becomes caretakers of an isolated hotel for the winter where a sinister presence influences the father.</description>
10+
</book>
11+
<book id="bk102">
12+
<author>Jane Austen</author>
13+
<title>Pride and Prejudice</title>
14+
<genre>Romance</genre>
15+
<price>7.99</price>
16+
<publish_date>1813-01-28</publish_date>
17+
<description>The story follows the main character Elizabeth Bennet as she deals with issues of manners, upbringing, morality, education, and marriage.</description>
18+
</book>
19+
</catalog>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)