-
-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (41 loc) · 1.16 KB
/
build-and-test.yml
File metadata and controls
45 lines (41 loc) · 1.16 KB
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
name: Build and Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Checkout a2a-java
uses: actions/checkout@v4
with:
repository: a2aproject/a2a-java
path: a2a-java
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build a2a-java with Maven, skipping tests
run: mvn -B install -DskipTests
working-directory: a2a-java
- name: Get a2a-java version and save as env var
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "SDK_VERSION=${VERSION}" >> "$GITHUB_ENV"
working-directory: a2a-java
- name: Run tests
run:
mvn clean install -B -Dversion.sdk=${SDK_VERSION}