feat!: cross-module @KraftConverter discovery on KMP via by-name delegate resolution #100
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: Test | |
| on: | |
| pull_request: | |
| # Also run on main so the Gradle cache is seeded on the default branch; | |
| # pull_request caches are scoped to their own PR and can't be shared. | |
| push: | |
| branches: [ main ] | |
| permissions: | |
| checks: write | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| # Caches Gradle distribution, dependencies, and build caches. | |
| # Writes only on main (default), so PR runs read without thrashing quota. | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Run detekt | |
| run: ./gradlew detekt --continue | |
| - name: Upload detekt reports | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: detekt-reports | |
| path: '**/build/reports/detekt/' | |
| - name: Run tests | |
| run: ./gradlew :kraft-ksp:jvmTest --continue | |
| # Real two-module KMP build: the consumer's converter only exists in the | |
| # producer's klib, so a green build proves cross-module @KraftConverter | |
| # discovery works under kspCommonMainKotlinMetadata (klib classpath). | |
| - name: KMP cross-module integration test | |
| run: ./gradlew :integration-tests:kmp-consumer:jvmTest :integration-tests:kmp-consumer:compileKotlinJs | |
| - name: Publish test results | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: kraft-ksp/build/reports/tests/jvmTest/ | |
| - name: Publish JUnit report | |
| uses: mikepenz/action-junit-report@v6 | |
| if: always() | |
| with: | |
| report_paths: kraft-ksp/build/test-results/jvmTest/**/*.xml |