This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new 29472c06d3 Fix GitHub action (#15136)
29472c06d3 is described below
commit 29472c06d36a5bf177f7f53720c01c3a7f382b96
Author: stellar <[email protected]>
AuthorDate: Mon Feb 17 19:20:33 2025 +0800
Fix GitHub action (#15136)
---
.github/workflows/build-and-test-pr.yml | 369 +++++++++++++--------
.github/workflows/build-and-test-scheduled-3.1.yml | 20 +-
.github/workflows/build-and-test-scheduled-3.2.yml | 20 +-
.github/workflows/build-and-test-scheduled-3.3.yml | 20 +-
.github/workflows/release-test.yml | 20 +-
5 files changed, 267 insertions(+), 182 deletions(-)
diff --git a/.github/workflows/build-and-test-pr.yml
b/.github/workflows/build-and-test-pr.yml
index 0a759bbe5b..d12273f7eb 100644
--- a/.github/workflows/build-and-test-pr.yml
+++ b/.github/workflows/build-and-test-pr.yml
@@ -1,4 +1,4 @@
-name: Build and Test For PR
+name: "Build and Test For PR"
on: [push, pull_request, workflow_dispatch]
@@ -16,33 +16,48 @@ env:
spring.version:5.3.24;
spring-boot.version:2.7.6;
'
+ MAVEN_OPTS: >-
+ -XX:+UseG1GC
+ -XX:InitiatingHeapOccupancyPercent=45
+ -XX:+UseStringDeduplication
+ -XX:-TieredCompilation
+ -XX:TieredStopAtLevel=1
+ -Dmaven.javadoc.skip=true
+ -Dmaven.wagon.http.retryHandler.count=5
+ -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
+ MAVEN_ARGS: >-
+ -e
+ --batch-mode
+ --no-snapshot-updates
+ --no-transfer-progress
+ --fail-fast
jobs:
check-format:
- name: Check if code needs formatting
+ name: "Check if code needs formatting"
runs-on: ubuntu-latest
steps:
- - name: Checkout
+ - name: "Checkout"
uses: actions/checkout@v4
- - name: Setup Maven
+ - name: "Setup maven"
uses: actions/setup-java@v4
with:
java-version: 21
distribution: zulu
- - name: Check if code aligns with code style
+ - name: "Check if code aligns with code style"
id: check
run: mvn --log-file mvn.log spotless:check
continue-on-error: true
- - name: Upload checkstyle result
+ - name: "Upload checkstyle result"
uses: actions/upload-artifact@v4
with:
name: checkstyle-result
path: mvn.log
- - name: Generate Summary for successful run
+ - name: "Generate Summary for successful run"
if: ${{ steps.check.outcome == 'success' }}
run: |
echo ":ballot_box_with_check: Kudos! No formatting issues found!" >>
$GITHUB_STEP_SUMMARY
- - name: Generate Summary for failed run
+ - name: "Generate Summary for failed run"
if: ${{ steps.check.outcome == 'failure' }}
run: |
echo "## :negative_squared_cross_mark: Formatting issues found!" >>
$GITHUB_STEP_SUMMARY
@@ -50,7 +65,7 @@ jobs:
cat mvn.log | grep "ERROR" | sed 's/Check if code needs formatting
Check if code aligns with code style [0-9A-Z:.-]\+//' | sed 's/\[ERROR] //'
| head -n -11 >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "Please run \`mvn spotless:apply\` to fix the formatting
issues." >> $GITHUB_STEP_SUMMARY
- - name: Fail if code needs formatting
+ - name: "Fail if code needs formatting"
if: ${{ steps.check.outcome == 'failure' }}
uses: actions/[email protected]
with:
@@ -63,20 +78,20 @@ jobs:
needs: check-format
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - name: Check License
+ - uses: actions/checkout@v4
+ - name: "Check License"
uses: apache/skywalking-eyes@e1a02359b239bd28de3f6d35fdc870250fa513d5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Set up JDK 21"
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: "Compile Dubbo (Linux)"
run: |
- ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress
--fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true
-Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true
-Dmaven.javadoc.skip=true
- - name: Check Dependencies' License
+ ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -Pskip-spotless
-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true
-Drat.skip=true
+ - name: "Check Dependencies' License"
uses:
apache/skywalking-eyes/dependency@e1a02359b239bd28de3f6d35fdc870250fa513d5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -91,36 +106,53 @@ jobs:
outputs:
version: ${{ steps.dubbo-version.outputs.version }}
steps:
- - uses: actions/checkout@v3
- with:
- path: dubbo
- - uses: actions/setup-java@v3
+ - name: "Checkout code"
+ uses: actions/checkout@v4
+ - name: "Set up JDK"
+ uses: actions/setup-java@v4
with:
distribution: 'zulu'
- java-version: 8
- - uses: actions/cache@v3
- name: "Cache local Maven repository"
+ java-version: 21
+ - name: "Set current date as env variable"
+ run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
+ - name: "Restore local maven repository cache"
+ uses: actions/cache/restore@v4
+ id: cache-maven-repository
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
github.run_id }}
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
env.TODAY }}
+ - name: "Restore common local maven repository cache"
+ uses: actions/cache/restore@v4
+ if: steps.cache-maven-repository.outputs.cache-hit != 'true'
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
- ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-maven-
- - name: "Dubbo cache"
- uses: actions/cache@v3
+ - name: "Clean dubbo cache"
+ run: rm -rf ~/.m2/repository/org/apache/dubbo
+ - name: "Build Dubbo with maven"
+ run: |
+ ./mvnw ${{ env.MAVEN_ARGS }} clean install
-Psources,'!demo',skip-spotless,checkstyle -Dmaven.test.skip=true
-DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
+ - name: "Save dubbo cache"
+ uses: actions/cache/save@v4
with:
path: ~/.m2/repository/org/apache/dubbo
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: "Clean dubbo cache"
+ run: rm -rf ~/.m2/repository/org/apache/dubbo
+ - name: "Save local maven repository cache"
+ uses: actions/cache/save@v4
+ if: steps.cache-maven-repository.outputs.cache-hit != 'true'
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
env.TODAY }}
- name: "Pack class result"
run: |
shopt -s globstar
zip ${{ github.workspace }}/class.zip **/target/classes/* -r
- name: "Upload class result"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "class-file"
path: ${{ github.workspace }}/class.zip
@@ -128,15 +160,15 @@ jobs:
if: failure()
run: zip ${{ github.workspace }}/checkstyle.zip *checkstyle* -r
- name: "Upload checkstyle file if failure"
+ uses: actions/upload-artifact@v4
if: failure()
- uses: actions/upload-artifact@v3
with:
name: "checkstyle-file"
path: ${{ github.workspace }}/checkstyle.zip
- 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"
@@ -147,10 +179,10 @@ jobs:
strategy:
fail-fast: false
env:
- ZOOKEEPER_VERSION: 3.6.3
+ ZOOKEEPER_VERSION: 3.7.2
steps:
- - uses: actions/cache@v3
- name: "Cache zookeeper binary archive"
+ - name: "Cache zookeeper binary archive"
+ uses: actions/cache@v3
id: "cache-zookeeper"
with:
path: ${{ github.workspace }}/.tmp/zookeeper
@@ -158,8 +190,8 @@ jobs:
restore-keys: |
zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }}
- name: "Set up msys2 if necessary"
- if: ${{ startsWith( matrix.os, 'windows') &&
steps.cache-zookeeper.outputs.cache-hit != 'true' }}
uses: msys2/setup-msys2@v2
+ if: ${{ startsWith( matrix.os, 'windows') &&
steps.cache-zookeeper.outputs.cache-hit != 'true' }}
with:
release: false # support cache, see
https://github.com/msys2/setup-msys2#context
- name: "Download zookeeper binary archive in Linux OS"
@@ -185,7 +217,7 @@ jobs:
CURRENT_ROLE: ${{ matrix.case-role }}
DUBBO_DEFAULT_SERIALIZATION: fastjson2
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Set up JDK ${{ matrix.jdk }}"
@@ -214,26 +246,26 @@ jobs:
run: |
./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress
--fail-fast clean test verify
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-Pjacoco,jdk15ge-simple,'!jdk15ge',jacoco089 -DtrimStackTrace=false
-Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false
-DskipIntegrationTests=false -Dcheckstyle.skip=false
-Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true
-DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper
- name: "Upload coverage result"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: coverage-result
path: "**/target/site/**/jacoco.xml"
+
samples-test-prepare:
needs: check-format
runs-on: ubuntu-latest
env:
JOB_COUNT: 3
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
ref: master
- name: "Prepare test list"
- run: |
- bash ./test/scripts/prepare-test.sh
+ run: bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-list
path: test/jobs
@@ -248,22 +280,24 @@ jobs:
strategy:
fail-fast: false
matrix:
- job_id: [1, 2, 3]
+ job_id: [1,2,3]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
ref: master
- - name: "Cache local Maven repository"
- uses: actions/cache@v3
+ - name: "Set current date as env variable"
+ run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
+ - name: "Restore local maven repository cache"
+ uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
github.run_id }}
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
env.TODAY }}
restore-keys: |
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-maven-
- name: "Restore Dubbo cache"
- uses: actions/cache@v3
+ uses: actions/cache/restore@v4
with:
path: ~/.m2/repository/org/apache/dubbo
key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{
github.run_id }}
@@ -271,12 +305,12 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-list
path: test/jobs/
- name: "Set up JDK 8"
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
@@ -286,23 +320,21 @@ jobs:
CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION"
echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV
- name: "Build test image"
- run: |
- cd test && bash ./build-test-image.sh
+ run: cd test && bash ./build-test-image.sh
- name: "Run tests"
run: cd test && bash ./run-tests.sh
- - name: "merge jacoco resule"
- run: |
- cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoMerge"
-Dexec.args="${{github.workspace}}"
+ - name: "merge jacoco result"
+ run: cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoMerge"
-Dexec.args="${{github.workspace}}"
- name: "Upload jacoco"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: samples-jacoco-result
+ name: samples-jacoco-result-${{matrix.job_id}}
path: target/jacoco*.exec
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: samples-test-result
+ name: samples-test-result-${{matrix.job_id}}
path: test/jobs/*-result*
samples-test-result:
needs: [check-format, samples-test-job]
@@ -311,14 +343,14 @@ jobs:
env:
JAVA_VER: 8
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
ref: master
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
- name: samples-test-result
+ pattern: samples-test-result-*
path: test/jobs/
- name: "Merge test result"
run: ./test/scripts/merge-test-results.sh
@@ -329,15 +361,14 @@ jobs:
env:
JOB_COUNT: 3
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Prepare test list"
- run: |
- bash ./test/scripts/prepare-test.sh
+ run: bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: test-list
path: test/jobs
@@ -352,22 +383,24 @@ jobs:
strategy:
fail-fast: false
matrix:
- job_id: [1, 2, 3]
+ job_id: [1,2,3]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
ref: main
- - name: "Cache local Maven repository"
- uses: actions/cache@v3
+ - name: "Set current date as env variable"
+ run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
+ - name: "Restore local maven repository cache"
+ uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
github.run_id }}
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
env.TODAY }}
restore-keys: |
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
${{ runner.os }}-maven-
- name: "Restore Dubbo cache"
- uses: actions/cache@v3
+ uses: actions/cache/restore@v4
with:
path: ~/.m2/repository/org/apache/dubbo
key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{
github.run_id }}
@@ -375,12 +408,12 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: test-list
path: test/jobs/
- name: "Set up JDK 8"
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
@@ -390,23 +423,21 @@ jobs:
CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION"
echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV
- name: "Build test image"
- run: |
- cd test && bash ./build-test-image.sh
+ run: cd test && bash ./build-test-image.sh
- name: "Run tests"
run: cd test && bash ./run-tests.sh
- - name: "merge jacoco resule"
- run: |
- cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoMerge"
-Dexec.args="${{github.workspace}}"
+ - name: "merge jacoco result"
+ run: cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoMerge"
-Dexec.args="${{github.workspace}}"
- name: "Upload jacoco"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: jacoco-result
+ name: jacoco-result-${{matrix.job_id}}
path: target/jacoco*.exec
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: test-result
+ name: test-result-${{matrix.job_id}}
path: test/jobs/*-result*
integration-test-result:
needs: [check-format, integration-test-job]
@@ -415,110 +446,149 @@ jobs:
env:
JAVA_VER: 8
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
- name: test-result
+ pattern: test-result-*
path: test/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,
unit-test]
+ needs: [check-format, samples-test-result]
steps:
- - uses: actions/checkout@v3
- with:
- path: "./dubbo"
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-samples'
path: "./dubbo-samples"
- - uses: actions/checkout@v3
+ - 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: |
+ unzip -o ${{ github.workspace }}/class.zip
+ - name: "Restore samples jacoco exec"
+ uses: actions/download-artifact@v4
+ with:
+ 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}}"
+ - name: "Remove old test result"
+ run: |
+ rm -rf ${{ github.workspace }}/dubbo-samples
+ - 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
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-integration-cases'
path: "./dubbo-integration-cases"
- name: "Set up JDK 21"
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: "Restore class result"
- uses: actions/download-artifact@v3
+ 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 jacoco exec"
- uses: actions/download-artifact@v3
- with:
- name: samples-jacoco-result
- path: dubbo-samples/target/
- - name: "Restore integration jacoco exec"
- uses: actions/download-artifact@v3
+ - name: "Restore integration test jacoco exec"
+ uses: actions/download-artifact@v4
with:
- name: jacoco-result
+ pattern: jacoco-result-*
+ github-token: ${{ secrets.GITHUB_TOKEN }}
path: dubbo-integration-cases/target/
- - 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"
- - name: "Merge samples jacoco result"
+ - 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: "Restore coverage result"
- uses: actions/download-artifact@v3
- with:
- name: coverage-result
- path: dubbo/
+ mvn clean compile exec:java
-Dexec.mainClass="org.apache.dubbo.test.JacocoReport"
-Dexec.args="${{github.workspace}}/dubbo-integration-cases
${{github.workspace}}"
+ - name: "Remove old test result"
+ run: |
+ rm -rf ${{ github.workspace }}/dubbo-integration-cases
- name: "Upload coverage to Codecov"
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
with:
+ token: ${{ secrets.CODECOV_TOKEN }}
+ flags: integration-tests
verbose: true
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+
error-code-inspecting:
needs: check-format
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
path: "./dubbo"
-
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: 'apache/dubbo-test-tools'
ref: main
path: "./dubbo-test-tools"
-
- name: "Set up JDK 21"
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
-
+ - name: "Restore local maven repository cache"
+ uses: actions/cache/restore@v4
+ id: cache-maven-repository
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
env.TODAY }}
+ restore-keys: |
+ ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ ${{ runner.os }}-maven-
- name: "Compile Dubbo (Linux)"
run: |
cd ${{ github.workspace }}/dubbo
- ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress
--fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true
-Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true
-Dmaven.javadoc.skip=true
+ ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P
'!demo',skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true
-Dcheckstyle_unix.skip=true -Drat.skip=true
- name: "Run Error Code Inspecting"
env:
DUBBO_ECI_REPORT_AS_ERROR: true
run: |
cd ${{ github.workspace
}}/dubbo-test-tools/dubbo-error-code-inspector
- ../mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress
--fail-fast -T 2C package exec:java
-Ddubbo.eci.report-as-error=${DUBBO_ECI_REPORT_AS_ERROR} -Dmaven.test.skip=true
-Dmaven.test.skip.exec=true -Ddubbo.eci.path=${{ github.workspace }}/dubbo
-
+ ../mvnw ${{ env.MAVEN_ARGS }} -T 2C package exec:java
-Ddubbo.eci.report-as-error=${DUBBO_ECI_REPORT_AS_ERROR} -Dmaven.test.skip=true
-Ddubbo.eci.path=${{ github.workspace }}/dubbo
- name: "Upload error code inspection result"
# always() should not be used here, since we don't need to handle the
'canceled' situation.
if: ${{ success() || failure() }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "error-inspection-result"
path: ${{ github.workspace
}}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt
@@ -527,11 +597,10 @@ jobs:
needs: check-format
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
path: "./dubbo"
-
- - name: "Setup GraalVM environment"
+ - name: "Set up GraalVM environment"
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.0'
@@ -539,29 +608,45 @@ jobs:
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
-
- - name: "Setup Zookeeper environment"
+ - name: "Set up Zookeeper environment"
run: |
wget
https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz
tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz
mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg
apache-zookeeper-3.8.4-bin/conf/zoo.cfg
apache-zookeeper-3.8.4-bin/bin/zkServer.sh start
-
- name: "Check environment"
run: |
java --version
native-image --version
-
+ - name: "Set current date as env variable"
+ run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV
+ - name: "Restore local Maven repository cache"
+ uses: actions/cache/restore@v4
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{
env.TODAY }}
+ restore-keys: |
+ ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ ${{ runner.os }}-maven-
- name: "Compile Dubbo (Linux)"
run: |
cd ${{ github.workspace }}/dubbo
- ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress
--fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true
-Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true
-Dmaven.javadoc.skip=true
-
- - name: "Compile and run Dubbo demo for native (Linux)"
+ ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P
'!demo',skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true
-Dcheckstyle_unix.skip=true -Drat.skip=true
+ - name: "Checkout dubbo-samples repository"
+ uses: actions/checkout@v4
+ with:
+ repository: 'apache/dubbo-samples'
+ ref: master
+ path: "./dubbo-samples"
+ - name: "Compile and run Dubbo native image demo"
run: |
- cd ${{ github.workspace
}}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider
- ${{ github.workspace }}/dubbo/mvnw --batch-mode
--no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean package
-P native -Dmaven.test.skip=true native:compile
- nohup ./target/dubbo-demo-native-provider &
- cd ${{ github.workspace
}}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer
- ${{ github.workspace }}/dubbo/mvnw --batch-mode
--no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean package
-P native -Dmaven.test.skip=true native:compile
- ./target/dubbo-demo-native-consumer
+ MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS
}} -Dmaven.test.skip=true"
+ cd ${{ github.workspace
}}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider
+ $MVNW clean package -P native native:compile
+ nohup ./target/dubbo-samples-native-image-provider &
+ sleep 10
+ curl \
+ --header "Content-Type: application/json" \
+ --data '{"name":"Dubbo"}' \
+
http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/
+
diff --git a/.github/workflows/build-and-test-scheduled-3.1.yml
b/.github/workflows/build-and-test-scheduled-3.1.yml
index 54a2abda85..4de3629a6c 100644
--- a/.github/workflows/build-and-test-scheduled-3.1.yml
+++ b/.github/workflows/build-and-test-scheduled-3.1.yml
@@ -66,7 +66,7 @@ jobs:
run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r
- name: "Upload checkstyle file if failure"
if: failure()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "checkstyle-file"
path: ${{ github.workspace }}/checkstyle.zip
@@ -236,7 +236,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-list
path: test/jobs
@@ -275,7 +275,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-list
path: test/jobs/
@@ -295,7 +295,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -314,7 +314,7 @@ jobs:
repository: 'apache/dubbo-samples'
ref: master
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -334,7 +334,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-list
path: test/jobs
@@ -373,7 +373,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-list
path: test/jobs/
@@ -393,7 +393,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -412,7 +412,7 @@ jobs:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -453,7 +453,7 @@ jobs:
- name: "Upload error code inspection result"
# always() should not be used here, since we don't need to handle the
'canceled' situation.
if: ${{ success() || failure() }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "error-inspection-result"
path: ${{ github.workspace
}}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt
diff --git a/.github/workflows/build-and-test-scheduled-3.2.yml
b/.github/workflows/build-and-test-scheduled-3.2.yml
index e3b3d95c8d..c083bcbd44 100644
--- a/.github/workflows/build-and-test-scheduled-3.2.yml
+++ b/.github/workflows/build-and-test-scheduled-3.2.yml
@@ -66,7 +66,7 @@ jobs:
run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r
- name: "Upload checkstyle file if failure"
if: failure()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "checkstyle-file"
path: ${{ github.workspace }}/checkstyle.zip
@@ -236,7 +236,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-list
path: test/jobs
@@ -275,7 +275,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-list
path: test/jobs/
@@ -295,7 +295,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -314,7 +314,7 @@ jobs:
repository: 'apache/dubbo-samples'
ref: master
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -334,7 +334,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-list
path: test/jobs
@@ -373,7 +373,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-list
path: test/jobs/
@@ -393,7 +393,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -412,7 +412,7 @@ jobs:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -453,7 +453,7 @@ jobs:
- name: "Upload error code inspection result"
# always() should not be used here, since we don't need to handle the
'canceled' situation.
if: ${{ success() || failure() }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "error-inspection-result"
path: ${{ github.workspace
}}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt
diff --git a/.github/workflows/build-and-test-scheduled-3.3.yml
b/.github/workflows/build-and-test-scheduled-3.3.yml
index 3240efb8f8..91bf6dc5a1 100644
--- a/.github/workflows/build-and-test-scheduled-3.3.yml
+++ b/.github/workflows/build-and-test-scheduled-3.3.yml
@@ -66,7 +66,7 @@ jobs:
run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r
- name: "Upload checkstyle file if failure"
if: failure()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "checkstyle-file"
path: ${{ github.workspace }}/checkstyle.zip
@@ -236,7 +236,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-list
path: test/jobs
@@ -275,7 +275,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-list
path: test/jobs/
@@ -295,7 +295,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -314,7 +314,7 @@ jobs:
repository: 'apache/dubbo-samples'
ref: master
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -334,7 +334,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-list
path: test/jobs
@@ -373,7 +373,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-list
path: test/jobs/
@@ -393,7 +393,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -412,7 +412,7 @@ jobs:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -453,7 +453,7 @@ jobs:
- name: "Upload error code inspection result"
# always() should not be used here, since we don't need to handle the
'canceled' situation.
if: ${{ success() || failure() }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "error-inspection-result"
path: ${{ github.workspace
}}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt
diff --git a/.github/workflows/release-test.yml
b/.github/workflows/release-test.yml
index 48131fda3c..b746f2fc4b 100644
--- a/.github/workflows/release-test.yml
+++ b/.github/workflows/release-test.yml
@@ -64,7 +64,7 @@ jobs:
run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r
- name: "Upload checkstyle file if failure"
if: failure()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "checkstyle-file"
path: ${{ github.workspace }}/checkstyle.zip
@@ -233,7 +233,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-list
path: test/jobs
@@ -272,7 +272,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-list
path: test/jobs/
@@ -292,7 +292,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -311,7 +311,7 @@ jobs:
repository: 'apache/dubbo-samples'
ref: master
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: samples-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -331,7 +331,7 @@ jobs:
run: |
bash ./test/scripts/prepare-test.sh
- name: "Upload test list"
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-list
path: test/jobs
@@ -370,7 +370,7 @@ jobs:
${{ runner.os }}-dubbo-snapshot-${{ github.sha }}
${{ runner.os }}-dubbo-snapshot-
- name: "Download test list"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-list
path: test/jobs/
@@ -390,7 +390,7 @@ jobs:
run: cd test && bash ./run-tests.sh
- name: "Upload test result"
if: always()
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/*-result*
@@ -409,7 +409,7 @@ jobs:
repository: 'apache/dubbo-integration-cases'
ref: main
- name: "Download test result"
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: integration-test-result-${{matrix.jdk}}
path: test/jobs/
@@ -449,7 +449,7 @@ jobs:
- name: "Upload error code inspection result"
# always() should not be used here, since we don't need to handle the
'canceled' situation.
if: ${{ success() || failure() }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: "error-inspection-result"
path: ${{ github.workspace
}}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt