File tree Expand file tree Collapse file tree 6 files changed +60
-9
lines changed
java/ql/src/Metrics/Summaries Expand file tree Collapse file tree 6 files changed +60
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : " Publish framework coverage as metrics"
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 5 0 * * *'
6
+ push :
7
+ branches :
8
+ - main
9
+ workflow_dispatch :
10
+ pull_request :
11
+ branches :
12
+ - main
13
+ paths :
14
+ - " .github/workflows/csv-coverage-metrics.yml"
15
+
16
+ jobs :
17
+ publish :
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ - name : Checkout repository
21
+ uses : actions/checkout@v2
22
+ - name : Setup CodeQL
23
+ uses : ./.github/actions/fetch-codeql
24
+ - name : Create empty database
25
+ run : |
26
+ DATABASE="${{ runner.temp }}/java-database"
27
+ PROJECT="${{ runner.temp }}/java-project"
28
+ mkdir -p "$PROJECT/src/tmp/empty"
29
+ echo "class Empty {}" >> "$PROJECT/src/tmp/empty/Empty.java"
30
+ codeql database create "$DATABASE" --language=java --source-root="$PROJECT" --command 'javac src/tmp/empty/Empty.java'
31
+ - name : Capture coverage information
32
+ run : |
33
+ DATABASE="${{ runner.temp }}/java-database"
34
+ codeql database analyze --format=sarif-latest --output=metrics.sarif -- "$DATABASE" ./java/ql/src/Metrics/Summaries/FrameworkCoverage.ql
35
+ - uses : actions/upload-artifact@v2
36
+ with :
37
+ name : metrics.sarif
38
+ path : metrics.sarif
39
+ retention-days : 20
40
+ - name : Upload SARIF file
41
+ uses : github/codeql-action/upload-sarif@v1
42
+ with :
43
+ sarif_file : metrics.sarif
Original file line number Diff line number Diff line change 1
1
/**
2
- * @name Diagnostics for framework coverage
3
- * @description Expose diagnostics for the number of API endpoints covered by CSV models.
4
- * @kind diagnostic
5
- * @id java/diagnostics/framework-coverage
2
+ * @id java/summary/framework-coverage
3
+ * @name Metrics of framework coverage
4
+ * @description Expose metrics for the number of API endpoints covered by CSV models.
5
+ * @kind metric
6
+ * @tags summary
6
7
*/
7
8
8
9
import java
Original file line number Diff line number Diff line change 24
24
- exclude :
25
25
deprecated : //
26
26
- exclude :
27
- query path : /^experimental\/.*/
27
+ query path :
28
+ - /^experimental\/.*/
29
+ - Metrics/Summaries/FrameworkCoverage.ql
Original file line number Diff line number Diff line change 22
22
- exclude :
23
23
deprecated : //
24
24
- exclude :
25
- query path : /^experimental\/.*/
25
+ query path :
26
+ - /^experimental\/.*/
27
+ - Metrics/Summaries/FrameworkCoverage.ql
Original file line number Diff line number Diff line change 25
25
- exclude :
26
26
deprecated : //
27
27
- exclude :
28
- query path : /^experimental\/.*/
28
+ query path :
29
+ - /^experimental\/.*/
30
+ - Metrics/Summaries/FrameworkCoverage.ql
29
31
Original file line number Diff line number Diff line change 30
30
- exclude :
31
31
deprecated : //
32
32
- exclude :
33
- query path : /^experimental\/.*/
34
-
33
+ query path :
34
+ - /^experimental\/.*/
35
+ - Metrics/Summaries/FrameworkCoverage.ql
You can’t perform that action at this time.
0 commit comments