taojintianxia commented on code in PR #32396:
URL: https://github.com/apache/shardingsphere/pull/32396#discussion_r1710581421
##########
.github/workflows/jacoco.yml:
##########
@@ -0,0 +1,51 @@
+name: Coverage
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout branch
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+
+ - name: Set up JDK 11 for Autogen
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: 11
+ cache: 'maven'
+ - uses: actions/cache@v4
+ with:
+ path: ~/.m2/repository
+ key: shardingsphere-maven-third-party-e2e-cache-${{ github.sha }}
+ restore-keys: |
+ shardingsphere-maven-third-party-e2e-cache-
+ shardingsphere-maven-third-party-
+
+ - name: Build Maven Env for Autogen
+ run: ./mvnw clean install -T1C
+
+ - name: Set up JDK 8 for Jacoco
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: 8
+ cache: 'maven'
+
+ - name: Build with Maven on Jacoco-exec
+ run: ./mvnw --show-version --batch-mode --no-transfer-progress verify
-Dmaven.test.failure.ignore=true -DfailIfNoTests=false
-Dsurefire.failIfNoSpecifiedTests=false
+
+ - name: Make script executable
+ run: chmod +x
./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
+
+ - name: Run code coverage merge script
+ run:
./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
+
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@v3
+ with:
+ files: ./target/mergeReport/jacoco.xml
+ token: ${{ secrets.CODECOV_TOKEN }}
Review Comment:
https://issues.apache.org/jira/browse/INFRA-26019?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]