Skip to content

Commit 910d283

Browse files
Add workflow file for Java example (#247)
1 parent 3e6a101 commit 910d283

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Java sample build and test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'a2a_agents/java/**'
9+
pull_request:
10+
paths:
11+
- 'a2a_agents/java/**'
12+
13+
jobs:
14+
build-and-test:
15+
name: Build and test Java agent sample
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Set up JDK
23+
uses: actions/setup-java@v3
24+
with:
25+
java-version: '21'
26+
distribution: 'temurin'
27+
28+
- name: Build with Maven
29+
working-directory: a2a_agents/java
30+
run: mvn clean install
31+
32+
- name: Run Tests
33+
working-directory: a2a_agents/java
34+
run: mvn test

a2a_agents/java/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Automatic build file output from some IDEs and editors
2+
target

a2a_agents/java/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<version>0.1.0-SNAPSHOT</version>
1010

1111
<properties>
12-
<maven.compiler.source>17</maven.compiler.source>
13-
<maven.compiler.target>17</maven.compiler.target>
12+
<maven.compiler.source>21</maven.compiler.source>
13+
<maven.compiler.target>21</maven.compiler.target>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515
<a2a.sdk.version>0.3.3.Final</a2a.sdk.version>
1616
<junit.version>5.10.2</junit.version>

0 commit comments

Comments
 (0)