revert: 去掉codecov,使用sonar

This reverts commit 811b9fd533.
This commit is contained in:
CaptainB 2023-10-26 09:52:12 +08:00 committed by 刘瑞斌
parent 37fe90457d
commit cfb103f2ae
2 changed files with 32 additions and 2 deletions

30
.github/workflows/codecov.yml vendored Normal file
View File

@ -0,0 +1,30 @@
on:
push:
branches:
- v3.*
pull_request:
branches:
- v3.*
name: MeterSphere 覆盖率统计
permissions:
pull-requests: write
jobs:
generic_handler:
name: 覆盖率统计
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

View File

@ -17,7 +17,7 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: 21 java-version: 21
distribution: 'temurin' # Alternative distribution options are available. distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarCloud packages - name: Cache SonarCloud packages
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -34,4 +34,4 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=metersphere_metersphere run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=metersphere_metersphere -DskipTests -DskipAntRunForJenkins --file backend/pom.xml