ci: upload coverage to Codecov #33
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - "LICENSE" | |
| - ".gitignore" | |
| - ".editorconfig" | |
| - "docs/diagrams/**" # diagrams workflow owns these | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - "LICENSE" | |
| - ".gitignore" | |
| - ".editorconfig" | |
| - "docs/diagrams/**" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: build (JDK ${{ matrix.jdk }}) | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 21 is the LTS floor (`--release 21`); 25 is the September 2025 LTS | |
| # and matches the toolchain the local developer setup uses. Both must | |
| # produce green tests on every PR. | |
| jdk: ["21", "25"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up JDK ${{ matrix.jdk }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: ${{ matrix.jdk }} | |
| cache: gradle | |
| - name: Validate Gradle wrapper | |
| uses: gradle/actions/wrapper-validation@v6 | |
| - name: Check formatting (Spotless) | |
| if: ${{ matrix.jdk == '21' }} | |
| run: ./gradlew spotlessCheck --no-daemon | |
| - name: Build | |
| run: | | |
| if [[ "${{ matrix.jdk }}" == "21" ]]; then | |
| ./gradlew build --no-daemon --stacktrace | |
| else | |
| ./gradlew build --no-daemon --stacktrace \ | |
| -x spotlessCheck \ | |
| -x spotlessJavaCheck \ | |
| -x spotlessJava | |
| fi | |
| - name: Run all runnable examples and recipes | |
| run: | | |
| ./gradlew --no-daemon --stacktrace \ | |
| :examples:submit-and-stream:run \ | |
| :examples:cancel:run \ | |
| :examples:heartbeat:run \ | |
| :examples:cost-budget:run \ | |
| :examples:result-chunk:run \ | |
| :examples:agent-versions:run \ | |
| :examples:list-jobs:run \ | |
| :examples:lease-expires-at:run \ | |
| :examples:idempotent-retry:run \ | |
| :examples:custom-auth:run \ | |
| :examples:provisioned-credentials:run \ | |
| :examples:ack-backpressure:run \ | |
| :examples:delegate:run \ | |
| :examples:spring-boot:run \ | |
| :examples:jakarta:run \ | |
| :examples:lease-violation:run \ | |
| :examples:progress:run \ | |
| :examples:resume:run \ | |
| :examples:stdio:run \ | |
| :examples:subscribe:run \ | |
| :examples:tracing:run \ | |
| :examples:vendor-extensions:run \ | |
| :recipes:email-vendor-leases:run \ | |
| :recipes:mcp-skill:run \ | |
| :recipes:multi-agent-budget:run \ | |
| :recipes:stream-resume:run | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-reports-jdk${{ matrix.jdk }} | |
| path: | | |
| **/build/reports/tests/ | |
| **/build/test-results/ | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| # Jacoco XML reports are emitted to **/build/reports/jacoco/test/ | |
| # because subprojects apply the jacoco plugin and Test is finalizedBy | |
| # jacocoTestReport (see root build.gradle.kts). Upload from the LTS | |
| # floor only — coverage is identical across JDKs. Non-blocking. | |
| - name: Upload coverage to Codecov | |
| if: matrix.jdk == '21' | |
| # codecov/codecov-action v6.0.1 | |
| uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 | |
| with: | |
| fail_ci_if_error: false | |
| flags: unittests | |
| files: "**/build/reports/jacoco/test/jacocoTestReport.xml" | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| javadoc: | |
| name: javadoc | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: gradle | |
| - name: Build javadoc for all published modules | |
| run: | | |
| ./gradlew --no-daemon \ | |
| :arcp-core:javadoc \ | |
| :arcp-client:javadoc \ | |
| :arcp-runtime:javadoc \ | |
| :arcp:javadoc \ | |
| :arcp-otel:javadoc \ | |
| :arcp-runtime-jetty:javadoc \ | |
| :arcp-middleware-jakarta:javadoc \ | |
| :arcp-middleware-spring-boot:javadoc \ | |
| :arcp-middleware-vertx:javadoc \ | |
| :arcp-tck:javadoc |