Skip to content

Commit

Permalink
Upload jacoco report to artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ committed Nov 16, 2023
1 parent 4383cad commit b160048
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ jobs:
version: ${{ steps.dubbo-version.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
path: dubbo
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
Expand All @@ -69,7 +67,6 @@ jobs:
key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }}
- name: "Build Dubbo with Maven"
run: |
cd ./dubbo
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean source:jar install -Pjacoco,checkstyle -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
- name: "Pack class result"
run: |
Expand All @@ -92,7 +89,7 @@ jobs:
- name: "Calculate Dubbo Version"
id: dubbo-version
run: |
REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml`
REVISION=`awk '/<revision>[^<]+<\/revision>/{gsub(/<revision>|<\/revision>/,"",$1);print $1;exit;}' ./pom.xml`
echo "version=$REVISION" >> $GITHUB_OUTPUT
echo "dubbo version: $REVISION"
Expand Down Expand Up @@ -209,7 +206,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: coverage-result
path: "**/target/site/**"
path: "**/target/site/**/jacoco.xml"

integration-test-prepare:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -321,8 +318,6 @@ jobs:
needs: [integration-test-result, unit-test]
steps:
- uses: actions/checkout@v3
with:
path: "./dubbo"
- uses: actions/checkout@v3
with:
repository: 'apache/dubbo-samples'
Expand All @@ -339,7 +334,6 @@ jobs:
path: ${{ github.workspace }}
- name: "Unpack class result"
run: |
cd ${{ github.workspace }}/dubbo
unzip -o ${{ github.workspace }}/class.zip
- name: "Restore jacoco exec"
uses: actions/download-artifact@v3
Expand All @@ -349,18 +343,15 @@ jobs:
- name: "Merge 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"
mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}/"
- name: "Restore coverage result"
uses: actions/download-artifact@v3
with:
name: coverage-result
path: dubbo/
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
with:
verbose: true
root_dir: ${{ github.workspace }}/dubbo/
directory: ${{ github.workspace }}/
- name: "Upload jacoco"
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit b160048

Please sign in to comment.