Skip to content

Commit

Permalink
Refactor : update jacoco check workflow (#32638)
Browse files Browse the repository at this point in the history
* Refactor : update jacoco check workflow

* Remove : remove useless workflow
  • Loading branch information
taojintianxia authored Aug 23, 2024
1 parent 94ba73c commit 72b20ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 60 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/jacoco.yml

This file was deleted.

18 changes: 5 additions & 13 deletions .github/workflows/nightly-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,49 +215,41 @@ jobs:
sed -i '/<requireMavenVersion>/i \ <dependencyConvergence/>' pom.xml
./mvnw clean install -DskipTests -T1C -Dmaven.enforcer.fail=true
codecov-jacoco:
check-and-report-jacoco:
if: github.repository == 'apache/shardingsphere'
name: Check - JacocoReport to CodeCov
name: Check - Jacoco
needs: global-environment
runs-on: ubuntu-latest
timeout-minutes: 80
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11

- 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: Install Project
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 and Run Code Coverage Merge Script
- name: Build with maven and execute jacoco aggregation script
run: |
./mvnw --show-version --batch-mode --no-transfer-progress verify -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false &&
chmod +x ./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh &&
./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh ${{ github.workspace }}
- name: Upload coverage reports to Codecov
- name: Upload coverage reports to codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ github.workspace }}/target/mergeReport/jacoco.xml
files: ${{ github.workspace }}/target/mergeReport/jacoco.xml

0 comments on commit 72b20ee

Please sign in to comment.