Skip to content

Commit 5ce6f35

Browse files
committed
Add a GH action to check compilation
1 parent 0e617d8 commit 5ce6f35

File tree

2 files changed

+44
-1
lines changed
  • .github/workflows
  • agents/agents-core-tools/src/commonTest/kotlin/ai/grazie/code/agents/core/tools/serialization

2 files changed

+44
-1
lines changed

.github/workflows/checks.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7+
8+
name: Checks
9+
10+
on:
11+
push:
12+
branches: [ "main" ]
13+
pull_request:
14+
branches: [ "main" ]
15+
16+
jobs:
17+
compilation:
18+
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
23+
steps:
24+
- name: Configure Git
25+
run: |
26+
git config --global core.autocrlf input
27+
- uses: actions/checkout@v4
28+
- name: Set up JDK 17
29+
uses: actions/setup-java@v4
30+
with:
31+
java-version: '17'
32+
distribution: 'corretto'
33+
34+
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
35+
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
36+
- name: Setup Gradle
37+
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
38+
39+
- name: Assemble with Gradle Wrapper
40+
run: ./gradlew assemble
41+
42+
- name: TestClasses with Gradle Wrapper
43+
run: ./gradlew jvmTestClasses jsTestClasses

agents/agents-core-tools/src/commonTest/kotlin/ai/grazie/code/agents/core/tools/serialization/ToolTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class ToolTest {
4848

4949
@Serializable
5050
data class Result(val first: String, val second: Int) : ToolResult {
51-
override fun toStringDefault(): String = JsonForTool.encodeToString(serializer(), this)
51+
override fun toStringDefault(): String = ToolJson.encodeToString(serializer(), this)
5252
}
5353

5454
override val argsSerializer = Args.serializer()

0 commit comments

Comments
 (0)