Skip to content

Commit

Permalink
chore(ci): remove ci jdk 20; upgrade bash-buddy
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Dec 19, 2023
1 parent 8c403ba commit 3f67e7f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 43 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand All @@ -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'
26 changes: 8 additions & 18 deletions .github/workflows/strong_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/bash-buddy
4 changes: 1 addition & 3 deletions scripts/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ readonly JDK_VERSIONS=(
8
11
"$default_build_jdk_version"
20
21
)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3f67e7f

Please sign in to comment.