Skip to content

Commit be496eb

Browse files
authored
Merge pull request #2452 from ClickHouse/add_coverage_report
Added attach jacoco report
2 parents 27ccb8e + 88915e0 commit be496eb

File tree

2 files changed

+469
-2
lines changed

2 files changed

+469
-2
lines changed

.github/workflows/analysis.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ env:
3131
PREFERRED_LTS_VERSION: "24.3"
3232

3333
jobs:
34-
static:
34+
sonarcloud:
35+
name: SonarCloud
3536
runs-on: ubuntu-latest
37+
permissions:
38+
contents: read
39+
pull-requests: write
3640
timeout-minutes: 30
37-
name: Static code analysis
3841
steps:
3942
- name: Check out Git repository
4043
uses: actions/checkout@v4
@@ -97,4 +100,17 @@ jobs:
97100
run: |
98101
mvn --batch-mode -DclickhouseVersion=$PREFERRED_LTS_VERSION \
99102
-Panalysis verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
103+
pwd
104+
ls -l ./client-v2/target/site/jacoco-aggregate/jacoco.xml
100105
continue-on-error: true
106+
- name: Generate and post coverage report
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
run: |
110+
pwd
111+
ls -la
112+
node jacoco-report-generator.mjs ./client-v2/target/site/jacoco-aggregate/jacoco.csv client-v2-cov.md --pr ${{ github.event.pull_request.number }} --title "Client V2 Coverage"
113+
node jacoco-report-generator.mjs ./jdbc-v2/target/site/jacoco-aggregate/jacoco.csv jdbc-v2-cov.md --pr ${{ github.event.pull_request.number }} --title "JDBC V2 Coverage"
114+
node jacoco-report-generator.mjs ./clickhouse-jdbc/target/site/jacoco-aggregate/jacoco.csv jdbc-v1-cov.md --pr ${{ github.event.pull_request.number }} --title "JDBC V1 Coverage"
115+
node jacoco-report-generator.mjs ./clickhouse-client/target/site/jacoco-aggregate/jacoco.csv client-v1-cov.md --pr ${{ github.event.pull_request.number }} --title "Client V1 Coverage"
116+
cat *-cov.md

0 commit comments

Comments
 (0)