-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (97 loc) · 4.02 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Quickstart for GitHub Actions
# https://docs.github.com/en/actions/quickstart
name: Fast CI
on: [ push, pull_request, workflow_dispatch ]
jobs:
test:
# 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 CI on OS ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
fail-fast: false
max-parallel: 64
steps:
- uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
# only first java setup need enable cache
cache: maven
- name: Build and test with Java 17 without agents
run: ./mvnw -V --no-transfer-progress clean install
- 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
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
run: ./mvnw dependency:properties surefire:test
env:
STUDY_AGENT_RUN_MODE: only-hello-agent-twice
- name: Run Main without agents
run: ./mvnw dependency:properties exec:exec -pl main-runner
- 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
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
run: ./mvnw dependency:properties exec:exec -pl main-runner
env:
STUDY_AGENT_RUN_MODE: only-hello-agent-twice
- name: Setup Java 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: zulu
- name: Test with Java 8 without agents
run: ./mvnw -V --no-transfer-progress dependency:properties surefire:test
- 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
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
run: ./mvnw dependency:properties surefire:test
env:
STUDY_AGENT_RUN_MODE: only-hello-agent-twice
- name: Run Main without agents
run: ./mvnw dependency:properties exec:exec -pl main-runner
- 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
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
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)'
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)'
run: Remove-Item -Recurse -Force $home/.m2/repository/io/foldright/study*
if: runner.os == 'Windows'