From 3f67e7fd8e4a1c2dba96557348e653a11f809aec Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Tue, 19 Dec 2023 17:47:40 +0800 Subject: [PATCH] chore(ci): remove ci jdk 20; upgrade `bash-buddy` --- .github/workflows/ci.yaml | 42 ++++++++++++++++---------------- .github/workflows/strong_ci.yaml | 26 ++++++-------------- scripts/bash-buddy | 2 +- scripts/integration_test.sh | 4 +-- 4 files changed, 31 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 004b472..27e59ff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ jobs: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners runs-on: ${{ matrix.os }} timeout-minutes: 10 - name: fast test on OS ${{ matrix.os }} + name: fast CI on OS ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest, windows-latest ] @@ -18,85 +18,85 @@ jobs: steps: - uses: actions/checkout@v3 - - name: setup Java 17 + - name: Setup Java 17 uses: actions/setup-java@v3 with: java-version: 17 distribution: temurin # only first java setup need enable cache cache: maven - - name: build and test with Java 17 without agents + - name: Build and test with Java 17 without agents run: ./mvnw -V --no-transfer-progress clean install - - name: test under hello and world agents + - name: Test under hello and world agents run: ./mvnw dependency:properties surefire:test env: STUDY_AGENT_RUN_MODE: hello-and-world-agents - - name: test under hello agent + - name: Test under hello agent run: ./mvnw dependency:properties surefire:test env: STUDY_AGENT_RUN_MODE: only-hello-agent STUDY_AGENT_ENABLE_CLASS_LOG: true - - name: test under hello agent twice + - name: Test under hello agent twice run: ./mvnw dependency:properties surefire:test env: STUDY_AGENT_RUN_MODE: only-hello-agent-twice - - name: run Main without agents + - name: Run Main without agents run: ./mvnw dependency:properties exec:exec -pl main-runner - - name: run Main under hello and world agents + - name: Run Main under hello and world agents run: ./mvnw dependency:properties exec:exec -pl main-runner env: STUDY_AGENT_RUN_MODE: hello-and-world-agents - - name: run Main under hello agent + - name: Run Main under hello agent run: ./mvnw dependency:properties exec:exec -pl main-runner env: STUDY_AGENT_RUN_MODE: only-hello-agent STUDY_AGENT_ENABLE_CLASS_LOG: true - - name: run Main under hello agent twice + - name: Run Main under hello agent twice run: ./mvnw dependency:properties exec:exec -pl main-runner env: STUDY_AGENT_RUN_MODE: only-hello-agent-twice - - name: setup Java 8 + - name: Setup Java 8 uses: actions/setup-java@v3 with: java-version: 8 distribution: zulu - - name: test with Java 8 without agents + - name: Test with Java 8 without agents run: ./mvnw -V --no-transfer-progress dependency:properties surefire:test - - name: test under hello and world agents + - name: Test under hello and world agents run: ./mvnw dependency:properties surefire:test env: STUDY_AGENT_RUN_MODE: hello-and-world-agents - - name: test under hello agent + - name: Test under hello agent run: ./mvnw dependency:properties surefire:test env: STUDY_AGENT_RUN_MODE: only-hello-agent STUDY_AGENT_ENABLE_CLASS_LOG: true - - name: test under hello agent twice + - name: Test under hello agent twice run: ./mvnw dependency:properties surefire:test env: STUDY_AGENT_RUN_MODE: only-hello-agent-twice - - name: run Main without agents + - name: Run Main without agents run: ./mvnw dependency:properties exec:exec -pl main-runner - - name: run Main under hello and world agents + - name: Run Main under hello and world agents run: ./mvnw dependency:properties exec:exec -pl main-runner env: STUDY_AGENT_RUN_MODE: hello-and-world-agents - - name: run Main under hello agent + - name: Run Main under hello agent run: ./mvnw dependency:properties exec:exec -pl main-runner env: STUDY_AGENT_RUN_MODE: only-hello-agent STUDY_AGENT_ENABLE_CLASS_LOG: true - - name: run Main under hello agent twice + - name: Run Main under hello agent twice run: ./mvnw dependency:properties exec:exec -pl main-runner env: STUDY_AGENT_RUN_MODE: only-hello-agent-twice - - name: 'remove self maven install files(OS: *nix)' + - name: 'Remove self maven install files(OS: *nix)' run: rm -rf $HOME/.m2/repository/io/foldright/study* # https://docs.github.com/en/actions/learn-github-actions/expressions # https://docs.github.com/en/actions/learn-github-actions/variables#detecting-the-operating-system if: runner.os != 'Windows' - - name: 'remove self maven install files(OS: Windows)' + - name: 'Remove self maven install files(OS: Windows)' run: Remove-Item -Recurse -Force $home/.m2/repository/io/foldright/study* if: runner.os == 'Windows' diff --git a/.github/workflows/strong_ci.yaml b/.github/workflows/strong_ci.yaml index 043871f..a36dc72 100644 --- a/.github/workflows/strong_ci.yaml +++ b/.github/workflows/strong_ci.yaml @@ -8,50 +8,40 @@ jobs: # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners runs-on: ubuntu-latest timeout-minutes: 15 - name: test by multiply java versions + name: CI by multiply java versions steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: setup Java 8 + - name: Setup Java 8 uses: actions/setup-java@v3 with: java-version: 8 distribution: zulu # only first java setup need enable cache cache: maven - - name: setup Java 11 + - name: Setup Java 11 uses: actions/setup-java@v3 with: java-version: 11 distribution: microsoft - - name: setup Java 17 + - name: Setup Java 17 uses: actions/setup-java@v3 with: java-version: 17 distribution: microsoft - - name: setup Java 20 - uses: actions/setup-java@v3 - with: - java-version: 20 - distribution: zulu - - name: setup Java 21 + - name: Setup Java 21 uses: actions/setup-java@v3 with: java-version: 21 distribution: zulu - - run: scripts/integration_test.sh - env: - JAVA8_HOME: ${{ env.JAVA_HOME_8_X64 }} - JAVA11_HOME: ${{ env.JAVA_HOME_11_X64 }} - JAVA17_HOME: ${{ env.JAVA_HOME_17_X64 }} - JAVA20_HOME: ${{ env.JAVA_HOME_20_X64 }} - JAVA21_HOME: ${{ env.JAVA_HOME_21_X64 }} + - name: Run integration test + run: scripts/integration_test.sh - - name: remove self maven install files + - name: Remove self maven install files run: rm -rf $HOME/.m2/repository/io/foldright/study* - name: Upload coverage reports to Codecov diff --git a/scripts/bash-buddy b/scripts/bash-buddy index d53f561..57958e4 160000 --- a/scripts/bash-buddy +++ b/scripts/bash-buddy @@ -1 +1 @@ -Subproject commit d53f56109ae97028ff70264491eec7b1a4ba1a6b +Subproject commit 57958e4f10f0fbf51318109dee8c4e7cf2de4738 diff --git a/scripts/integration_test.sh b/scripts/integration_test.sh index 3efdfb7..5f857a5 100755 --- a/scripts/integration_test.sh +++ b/scripts/integration_test.sh @@ -19,7 +19,6 @@ readonly JDK_VERSIONS=( 8 11 "$default_build_jdk_version" - 20 21 ) @@ -54,8 +53,7 @@ mvu::mvn_cmd clean install # about CI env var # https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables if [ "${CI:-}" = true ]; then - CI_MORE_BEGIN_OPTS=jacoco:prepare-agent - CI_MORE_END_OPTS=jacoco:report + CI_MORE_BEGIN_OPTS=jacoco:prepare-agent CI_MORE_END_OPTS=jacoco:report fi for jdk_version in "${JDK_VERSIONS[@]}"; do