Skip to content

Ensures that the type field for each AnthropicToolSchema is serialized when we construct the request body. #1819

Ensures that the type field for each AnthropicToolSchema is serialized when we construct the request body.

Ensures that the type field for each AnthropicToolSchema is serialized when we construct the request body. #1819

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Checks
on:
push:
branches: [ "main", "develop" ]
pull_request:
jobs:
compilation:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Configure Git
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Assemble with Gradle Wrapper
run: ./gradlew assemble ktlintCheck
- name: TestClasses with Gradle Wrapper
run: ./gradlew jvmTestClasses jsTestClasses
docs:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Configure Git
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build docs
run: |
cd ./docs
pip install mkdocs-material
pip install mkdocs-redirects
mkdocs build
tests:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
steps:
- name: Configure Git
run: |
git config --global core.autocrlf input
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: JvmTest with Gradle Wrapper and Kover coverage
if: matrix.os == 'ubuntu-latest'
run: ./gradlew jvmTest :koverBinaryReport --continue
- name: JvmTest with Gradle Wrapper
if: matrix.os != 'ubuntu-latest'
run: ./gradlew jvmTest --continue
- name: Archive coverage data
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: gradle-coverage-data.zip
path: .qodana/code-coverage
- name: Collect reports
if: always()
uses: actions/upload-artifact@v4
with:
name: reports-${{ matrix.os }}
path: |
**/build/reports/
qodana:
needs: [tests]
if: github.repository == 'jetbrains/koog'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
persist-credentials: false # https://github.com/orgs/community/discussions/151365
# Add Java setup step
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin' # Popular OpenJDK distribution
# Download the coverage data artifact
- name: Download coverage data
uses: actions/download-artifact@v4
with:
name: gradle-coverage-data.zip
path: .qodana/code-coverage
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
pr-mode: false
args: --apply-fixes,--baseline,qodana.sarif.json
push-fixes: branch
use-caches: 'false'
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_1399872884 }}
QODANA_ENDPOINT: 'https://qodana.cloud'
knit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- uses: gradle/actions/setup-gradle@v4
- name: Generate and verify code examples
run: |
echo "Starting knit generation..."
FILES_BEFORE_KNIT=$(find docs/src/ -name "*.kt" 2>/dev/null | wc -l || echo "0")
echo "Files before knit: $FILES_BEFORE_KNIT"
./gradlew :docs:knit
FILES_AFTER_KNIT=$(find docs/src/ -name "*.kt" 2>/dev/null | wc -l || echo "0")
echo "Files after knit: $FILES_AFTER_KNIT"
KNIT_GENERATED_FILES=$((FILES_AFTER_KNIT - FILES_BEFORE_KNIT))
echo "Knit generated $KNIT_GENERATED_FILES files"
echo "Starting assemble..."
./gradlew :docs:assemble