Skip to content

Commit 092e2f9

Browse files
Add workflow to verify Python example builds (#245)
* Fix more us artifact registry references in lock files * Create GH workflow for python examples * Clean up python workflow file * Trivial change to test the workflow rule Plus this actually fixes a typo * Also omit these new dirs from the web builds (they truly don't affect them afaik) * Another trivial testing change * Add workflow file for Java example (#247)
1 parent 7c20e5a commit 092e2f9

File tree

10 files changed

+108
-3
lines changed

10 files changed

+108
-3
lines changed

.github/workflows/editor_build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Editor build
33
on:
44
push:
55
branches: [ main ]
6+
paths-ignore:
7+
- 'a2a_agents/python/adk/samples/**'
68
pull_request:
9+
paths-ignore:
10+
- 'a2a_agents/python/adk/samples/**'
711

812
jobs:
913
build:
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

.github/workflows/lit_samples_build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Lit samples build
33
on:
44
push:
55
branches: [ main ]
6+
paths-ignore:
7+
- 'a2a_agents/python/adk/samples/**'
68
pull_request:
9+
paths-ignore:
10+
- 'a2a_agents/python/adk/samples/**'
711

812
jobs:
913
build:

.github/workflows/ng_build_and_test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Angular build and test
33
on:
44
push:
55
branches: [ main ]
6+
paths-ignore:
7+
- 'a2a_agents/python/adk/samples/**'
68
pull_request:
9+
paths-ignore:
10+
- 'a2a_agents/python/adk/samples/**'
711

812
jobs:
913
build-and-test:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build python samples
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'a2a_agents/python/adk/samples/**'
9+
pull_request:
10+
paths:
11+
- 'a2a_agents/python/adk/samples/**'
12+
13+
jobs:
14+
build:
15+
name: Build samples
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: '3.x'
26+
27+
- name: Install `uv` globally
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install uv
31+
32+
- name: Build contact_lookup
33+
working-directory: a2a_agents/python/adk/samples/contact_lookup
34+
run: uv build .
35+
36+
- name: Build orchestrator
37+
working-directory: a2a_agents/python/adk/samples/orchestrator
38+
run: uv build .
39+
40+
- name: Build restaurant_finder
41+
working-directory: a2a_agents/python/adk/samples/restaurant_finder
42+
run: uv build .
43+
44+
- name: Build rizzcharts
45+
working-directory: a2a_agents/python/adk/samples/rizzcharts
46+
run: uv build .

.github/workflows/web_build_and_test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Web (Lit) build and test
33
on:
44
push:
55
branches: [ main ]
6+
paths-ignore:
7+
- 'a2a_agents/python/adk/samples/**'
68
pull_request:
9+
paths-ignore:
10+
- 'a2a_agents/python/adk/samples/**'
711

812
jobs:
913
build-and-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>

a2a_agents/python/adk/samples/contact_lookup/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ This sample uses the Agent Development Kit (ADK) along with the A2A protocol to
2020

2121
```bash
2222
echo "GEMINI_API_KEY=your_api_key_here" > .env
23+
```
24+
25+
3. Run the server:
26+
27+
```bash
28+
uv run .
29+
```
2330

2431

2532
## Disclaimer

a2a_agents/python/adk/samples/restaurant_finder/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This sample uses the Agent Development Kit (ADK) along with the A2A protocol to
2222
echo "GEMINI_API_KEY=your_api_key_here" > .env
2323
```
2424

25-
3. Run an agent:
25+
3. Run the agent server:
2626

2727
```bash
2828
uv run .

0 commit comments

Comments
 (0)