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 2323 # Move in the generated dom APIs into a new version of TSC
2424 cp -rf ../generated/* src/lib
2525
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 77 "fetch-mdn" : " npm run build && node ./lib/mdnfetcher.js" ,
88 "fetch" : " echo This could take a few minutes... && npm run fetch-idl && npm run fetch-mdn" ,
99 "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"
1112 },
1213 "dependencies" : {
1314 "@types/jsdom" : " ^16.2.4" ,
1415 "@types/node" : " ^14.6.4" ,
1516 "@types/node-fetch" : " ^2.5.7" ,
1617 "@types/webidl2" : " ^23.13.2" ,
1718 "cpx2" : " ^2.0.0" ,
19+ "danger" : " ^10.5.4" ,
1820 "jsdom" : " ^16.4.0" ,
1921 "node-fetch" : " ^2.6.1" ,
2022 "print-diff" : " ^1.0.0" ,
You can’t perform that action at this time.
0 commit comments