File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 23
23
# Move in the generated dom APIs into a new version of TSC
24
24
cp -rf ../generated/* src/lib
25
25
26
- # Run TypeScript's tests with the new DOM libs
27
- npm test
26
+ # Run TypeScript's tests with the new DOM libs, but don't fail
27
+ npm test || true
28
+ gulp baseline-accept
29
+
30
+ # The git diff now is the difference between tests
31
+ git diff > baseline-changes.diff
32
+
33
+ - name : Danger
34
+ run : npm run danger -- ci
35
+ env :
36
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37
+
Original file line number Diff line number Diff line change
1
+ const { message} = require ( "danger" )
2
+ const { readFileSync, existsSync} = require ( "fs" )
3
+
4
+ const diffPath = "baseline-changes.diff"
5
+ if ( existsSync ( diffPath ) ) {
6
+ const diffContents = readFileSync ( diffPath , "utf8" )
7
+ message ( diffContents )
8
+ }
Original file line number Diff line number Diff line change 7
7
"fetch-mdn" : " npm run build && node ./lib/mdnfetcher.js" ,
8
8
"fetch" : " echo This could take a few minutes... && npm run fetch-idl && npm run fetch-mdn" ,
9
9
"baseline-accept" : " cpx \" generated\\ *\" baselines\\ " ,
10
- "test" : " tsc -p ./tsconfig.json && node ./lib/index.js && node ./lib/test.js"
10
+ "test" : " tsc -p ./tsconfig.json && node ./lib/index.js && node ./lib/test.js" ,
11
+ "danger" : " danger"
11
12
},
12
13
"dependencies" : {
13
14
"@types/jsdom" : " ^16.2.4" ,
14
15
"@types/node" : " ^14.6.4" ,
15
16
"@types/node-fetch" : " ^2.5.7" ,
16
17
"@types/webidl2" : " ^23.13.2" ,
17
18
"cpx2" : " ^2.0.0" ,
19
+ "danger" : " ^10.5.4" ,
18
20
"jsdom" : " ^16.4.0" ,
19
21
"node-fetch" : " ^2.6.1" ,
20
22
"print-diff" : " ^1.0.0" ,
You can’t perform that action at this time.
0 commit comments