Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed Dec 1, 2024
1 parent af85aea commit 5c06c2f
Showing 1 changed file with 52 additions and 13 deletions.
65 changes: 52 additions & 13 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ jobs:
if: failure()
run: cat test_errors.log
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
version: v0.6.0
verbose: true
flags: unit-tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: "Upload surefire reports"
Expand Down Expand Up @@ -475,9 +475,9 @@ jobs:
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh

jacoco-result-merge:
samples-jacoco-result-merge:
runs-on: ubuntu-latest
needs: [check-format, integration-test-result, samples-test-result]
needs: [check-format, samples-test-result]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -486,10 +486,6 @@ jobs:
with:
repository: 'apache/dubbo-samples'
path: "./dubbo-samples"
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
path: "./dubbo-integration-cases"
- name: "Set up JDK 21"
uses: actions/setup-java@v4
with:
Expand All @@ -511,25 +507,68 @@ jobs:
pattern: samples-jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-samples/target/
- name: "Merge samples jacoco result"
run: |
cd ${{ github.workspace }}/dubbo-samples/test/dubbo-test-jacoco-merger
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}/dubbo"
- name: "Remove old test result"
run: |
rm -rf ${{ github.workspace }}/dubbo-samples
mv ${{ github.workspace }}/dubbo ${{ github.workspace }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: samples-tests
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

integration-jacoco-result-merge:
runs-on: ubuntu-latest
needs: [check-format, integration-test-result, samples-test-result]
steps:
- uses: actions/checkout@v4
with:
path: "./dubbo"
- uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
path: "./dubbo-integration-cases"
- name: "Set up JDK 21"
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: "Restore class result"
uses: actions/download-artifact@v4
with:
name: "class-file"
github-token: ${{ secrets.GITHUB_TOKEN }}
path: ${{ github.workspace }}
- name: "Unpack class result"
run: |
cd ${{ github.workspace }}/dubbo
unzip -o ${{ github.workspace }}/class.zip
- name: "Restore integration test jacoco exec"
uses: actions/download-artifact@v4
with:
pattern: jacoco-result-*
github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-integration-cases/target/
- name: "Merge samples jacoco result"
run: |
cd ${{ github.workspace }}/dubbo-samples/test/dubbo-test-jacoco-merger
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}/dubbo"
- name: "Merge integration test jacoco result"
run: |
cd ${{ github.workspace }}/dubbo-integration-cases/test/dubbo-test-jacoco-merger
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-integration-cases ${{github.workspace}}/dubbo"
- name: "Remove old test result"
run: |
rm -rf ${{ github.workspace }}/dubbo-integration-cases
mv ${{ github.workspace }}/dubbo ${{ github.workspace }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
version: v0.6.0
flags: samples-tests
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down

0 comments on commit 5c06c2f

Please sign in to comment.