File tree Expand file tree Collapse file tree 5 files changed +44
-1
lines changed
content/about/coverage-and-quality Expand file tree Collapse file tree 5 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 9
9
- " .github/workflows/examples.yml"
10
10
- " content/**/examples/**"
11
11
- " scripts/reference-tables.*"
12
+ - " scripts/coverage-report.*"
13
+ - " coverage/**"
12
14
pull_request :
13
15
paths :
14
16
- " package*.json"
15
17
- " .github/workflows/examples.yml"
16
18
- " content/**/examples/**"
17
19
- " scripts/reference-tables.*"
20
+ - " scripts/coverage-report.*"
21
+ - " coverage/**"
18
22
19
23
jobs :
20
24
examples :
36
40
37
41
- name : Ensure no git changes
38
42
run : git diff --exit-code
43
+
44
+ coverage :
45
+ runs-on : ubuntu-latest
46
+
47
+ steps :
48
+ - uses : actions/checkout@v2
49
+
50
+ - name : Set up Node.js
51
+ uses : actions/setup-node@v2
52
+ with :
53
+ cache : npm
54
+
55
+ - name : Install dependencies
56
+ run : npm ci
57
+
58
+ - name : Generate coverage files
59
+ run : npm run coverage-report
60
+
61
+ - name : Ensure no git changes
62
+ run : git diff --exit-code
Original file line number Diff line number Diff line change 17
17
< body >
18
18
< main >
19
19
< h1 > Coverage and Quality Reports</ h1 >
20
+ < p > Page last updated: February 13, 2024</ p >
20
21
< section >
21
22
< h2 > About These Reports</ h2 >
22
23
< p >
Original file line number Diff line number Diff line change 17
17
"lint:html" : " npm run htmlhint && npm run vnu-jar" ,
18
18
"lint:spelling" : " cspell \" **/*.*\" " ,
19
19
"link-checker" : " node ./scripts/link-checker.js" ,
20
+ "coverage-report" : " node scripts/coverage-report.js" ,
20
21
"reference-tables" : " node scripts/reference-tables.js" ,
21
22
"regression" : " ava --timeout=1m" ,
22
23
"regression-report" : " node test/util/report" ,
69
70
],
70
71
"content/patterns/**/examples/*.html" : [
71
72
" npm run reference-tables" ,
72
- " git add content/index/index.html"
73
+ " git add content/index/index.html" ,
74
+ " npm run coverage-report" ,
75
+ " git add coverage/"
73
76
]
74
77
},
75
78
"ava" : {
Original file line number Diff line number Diff line change @@ -1138,12 +1138,26 @@ $('#example_summary_prototype').html(countPrototype);
1138
1138
$ ( '#example_summary_mouse' ) . html ( countMouse ) ;
1139
1139
$ ( '#example_summary_pointer' ) . html ( countPointer ) ;
1140
1140
1141
+ // Create a new Date object
1142
+ var currentDate = new Date ( ) ;
1143
+
1144
+ // Format the date as a string
1145
+ const formattedDate = currentDate . toLocaleDateString ( 'en-US' , {
1146
+ day : 'numeric' ,
1147
+ month : 'long' ,
1148
+ year : 'numeric' ,
1149
+ } ) ;
1150
+
1141
1151
// cheerio seems to fold the doctype lines despite the template
1142
1152
const result = $ . html ( )
1143
1153
. replace ( '<!DOCTYPE html>' , '<!DOCTYPE html>\n' )
1144
1154
. replace (
1145
1155
'<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">' ,
1146
1156
'<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">\n'
1157
+ )
1158
+ . replace (
1159
+ '<p>Page last updated: </p>' ,
1160
+ `<p>Page last updated: ${ formattedDate } </p>`
1147
1161
) ;
1148
1162
1149
1163
fs . writeFile ( coverageReportPath , result , function ( err ) {
Original file line number Diff line number Diff line change 18
18
<body>
19
19
<main>
20
20
<h1>Coverage and Quality Reports</h1>
21
+ <p>Page last updated: </p>
21
22
<section>
22
23
<h2>About These Reports</h2>
23
24
<p>
You can’t perform that action at this time.
0 commit comments