This is an automated email from the ASF dual-hosted git repository. jimin pushed a commit to branch 2.x in repository https://gitbox.apache.org/repos/asf/incubator-seata.git
The following commit(s) were added to refs/heads/2.x by this push: new 3b40167b06 optimize: enhance ci configuration (#7270) 3b40167b06 is described below commit 3b40167b06aa4bd707ae32bfc5774219e63fcfb0 Author: YoWuwuuuw <2216348...@qq.com> AuthorDate: Wed May 14 13:56:20 2025 +0800 optimize: enhance ci configuration (#7270) --- .github/workflows/build.yml | 26 +++++++++++++++++++++++--- .github/workflows/rerun-build.yml | 39 +++++++++++++++++++++++++++++++++++++++ changes/en-us/2.x.md | 5 +++-- changes/zh-cn/2.x.md | 2 ++ 4 files changed, 67 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68016bbf35..2d31adf71a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,9 @@ on: branches: [ 2.x, develop, master ] pull_request: branches: [ 2.x, develop, master ] + types: [opened, reopened, synchronize] + paths-ignore: + - '**.md' jobs: # job 1: Test based on java 8, 17 and 21. Do not checkstyle. @@ -63,20 +66,37 @@ jobs: # step 4 - name: "Print maven version" run: ./mvnw -version - # step 5.1 + # step 5 + - 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- + # step 6.1 - name: "Test, Check style, Check PMD, Check license with Maven and Java8" if: matrix.java == '8' run: | ./mvnw -T 4C clean test \ -Dcheckstyle.skip=false -Dpmd.skip=false -Dlicense.skip=false -DredisCaseEnabled=true \ -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; - # step 5.2 + # step 6.2 - name: "Test with Maven and Java${{ matrix.java }}" if: matrix.java != '8' run: | ./mvnw -T 4C clean test \ -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn; - # step 6 + # step 7 + - 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 }} + # step 8 - name: "Codecov" if: matrix.java == '8' uses: codecov/codecov-action@v4.0.1 diff --git a/.github/workflows/rerun-build.yml b/.github/workflows/rerun-build.yml new file mode 100644 index 0000000000..7b4212be8a --- /dev/null +++ b/.github/workflows/rerun-build.yml @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: Rerun build + +on: + workflow_run: + workflows: ["build"] + types: + - completed + +permissions: + actions: write + +jobs: + rerun: + if: github.event.workflow_run.conclusion == 'failure' && fromJSON(github.event.workflow_run.run_attempt) < 2 + runs-on: ubuntu-latest + steps: + - name: rerun ${{ github.event.workflow_run.id }} + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh run watch ${{ github.event.workflow_run.id }} > /dev/null 2>&1 + gh run rerun ${{ github.event.workflow_run.id }} --failed \ No newline at end of file diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index 3f35d9ff2a..296eec3bae 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -31,8 +31,9 @@ Add changes here for all PR submitted to the 2.x branch. ### optimize: -- [[#7310](https://github.com/seata/seata/pull/7310)] Optimize minor issues in the naming-server +- [[#7270](https://github.com/apache/incubator-seata/pull/7270)] enhance ci configuration - [[#7282](https://github.com/apache/incubator-seata/pull/7282)] optimize unexpected NullPointerException in lookup method in FileRegistryServiceImpl class +- [[#7310](https://github.com/seata/seata/pull/7310)] Optimize minor issues in the naming-server - [[#7329](https://github.com/apache/incubator-seata/pull/7329)] upgrade tomcat to 9.0.100 @@ -40,7 +41,6 @@ Add changes here for all PR submitted to the 2.x branch. - [[#PR_NO](https://github.com/seata/seata/pull/PR_NO)] upgrade XXX - ### test: - [[#7092](https://github.com/apache/incubator-seata/pull/7092)] fix the issue of NacosMockTest failing to run @@ -82,5 +82,6 @@ Thanks to these contributors for their code commits. Please report an unintended - [wjwang00](https://github.com/wjwang00) - [YongGoose](https://github.com/YongGoose) - [JisoLya](https://github.com/JisoLya) +- [YoWuwuuuw](https://github.com/YoWuwuuuw) Also, we receive many valuable issues, questions and advices from our community. Thanks for you all. diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index 2df96f51a2..941ac2d168 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -30,6 +30,7 @@ ### optimize: +- [[#7270](https://github.com/apache/incubator-seata/pull/7270)] 增强 ci 配置 - [[#7282](https://github.com/apache/incubator-seata/pull/7282)] 优化FileRegistryServiceImpl类lookup的NullPointerException问题 - [[#7310](https://github.com/seata/seata/pull/7310)] 优化naming-server中的一些小问题 - [[#7329](https://github.com/apache/incubator-seata/pull/7329)] 将 tomcat 升级到 9.0.100 @@ -81,5 +82,6 @@ - [wjwang00](https://github.com/wjwang00) - [YongGoose](https://github.com/YongGoose) - [JisoLya](https://github.com/JisoLya) +- [YoWuwuuuw](https://github.com/YoWuwuuuw) 同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。 --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org