mirror of
https://github.com/apache/rocketmq.git
synced 2026-08-30 18:10:44 +08:00
improve performance
This commit is contained in:
committed by
Zhouxiang Zhan
parent
8e356b0620
commit
eaf3b9f557
@@ -2,48 +2,11 @@ name: PR-CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
if: always()
|
||||
name: Unit test
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu, macos, windows]
|
||||
java-version: [8]
|
||||
include:
|
||||
- os: ubuntu
|
||||
java-version: 11
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache maven repository
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: ${{ matrix.java-version }}
|
||||
distribution: adopt
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
cd broker
|
||||
mvn -B test --file pom.xml
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
if: always() # always run even if the previous step fails
|
||||
with:
|
||||
report_paths: '**/surefire-reports/TEST-*.xml'
|
||||
annotate_only: true
|
||||
dist-tar:
|
||||
if: ${{ success() }}
|
||||
name: Build dist tar
|
||||
needs: [unit-test]
|
||||
name: Build distribution tar
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
@@ -57,7 +20,7 @@ jobs:
|
||||
cache: "maven"
|
||||
- name: Build distribution tar
|
||||
run: |
|
||||
mvn -Prelease-all -DskipTests clean install -U
|
||||
mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
|
||||
- uses: actions/upload-artifact@v3
|
||||
name: Upload distribution tar
|
||||
with:
|
||||
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
ls
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: cryptoya/rocketmq-docker.git
|
||||
repository: apache/rocketmq-docker.git
|
||||
ref: master
|
||||
path: rocketmq-docker
|
||||
- name: Build and save docker images
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
test-version: "${{ matrix.version }}"
|
||||
docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
|
||||
docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
|
||||
chart-git: "https://ghproxy.com/https://github.com/cryptoya/rocketmq-docker.git"
|
||||
chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
|
||||
chart-branch: "master"
|
||||
chart-path: "./rocketmq-k8s-helm"
|
||||
job-id: ${{ strategy.job-index }}
|
||||
@@ -136,6 +136,13 @@ jobs:
|
||||
annotate_only: true
|
||||
include_passed: true
|
||||
detailed_summary: true
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
name: Upload test log
|
||||
with:
|
||||
name: testlog.txt
|
||||
path: testlog.txt
|
||||
|
||||
|
||||
clean:
|
||||
if: always()
|
||||
|
||||
@@ -2,59 +2,19 @@ name: PUSH-CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
#schedule:
|
||||
# - cron: "0 18 * * *" # TimeZone: UTC 0
|
||||
|
||||
concurrency:
|
||||
group: rocketmq-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
if: always()
|
||||
name: Unit test
|
||||
# needs: []
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu, macos, windows]
|
||||
java-version: [8]
|
||||
include:
|
||||
- os: ubuntu
|
||||
java-version: 11
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache maven repository
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: ${{ matrix.java-version }}
|
||||
distribution: adopt
|
||||
- name: Build and test
|
||||
run: |
|
||||
cd broker
|
||||
mvn -B test --file pom.xml
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
if: always() # always run even if the previous step fails
|
||||
with:
|
||||
report_paths: '**/surefire-reports/TEST-*.xml'
|
||||
annotate_only: true
|
||||
|
||||
dist-tar:
|
||||
if: ${{ success() }}
|
||||
name: Build dist tar
|
||||
needs: [unit-test]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
@@ -68,7 +28,7 @@ jobs:
|
||||
cache: "maven"
|
||||
- name: Build distribution tar
|
||||
run: |
|
||||
mvn -Prelease-all -DskipTests clean install -U
|
||||
mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
|
||||
- uses: actions/upload-artifact@v3
|
||||
name: Upload distribution tar
|
||||
with:
|
||||
@@ -149,7 +109,7 @@ jobs:
|
||||
test-version: "${{ matrix.version }}"
|
||||
docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
|
||||
docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
|
||||
chart-git: "https://ghproxy.com/https://github.com/cryptoya/rocketmq-docker.git"
|
||||
chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
|
||||
chart-branch: "master"
|
||||
chart-path: "./rocketmq-k8s-helm"
|
||||
job-id: ${{ strategy.job-index }}
|
||||
@@ -173,7 +133,7 @@ jobs:
|
||||
test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git"
|
||||
test-code-branch: "master"
|
||||
test-code-path: java/e2e
|
||||
test-cmd: "mvn -B test"
|
||||
test-cmd: "mvn -B test -Djunit.jupiter.execution.parallel.config.dynamic.factor=2"
|
||||
job-id: ${{ strategy.job-index }}
|
||||
- name: Publish Test Report
|
||||
uses: mikepenz/action-junit-report@v3
|
||||
@@ -183,6 +143,12 @@ jobs:
|
||||
annotate_only: true
|
||||
include_passed: true
|
||||
detailed_summary: true
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
name: Upload test log
|
||||
with:
|
||||
name: testlog.txt
|
||||
path: testlog.txt
|
||||
|
||||
clean:
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user