chore: bump ci actions to their node 24 majors #107
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: build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| # A newer push supersedes any in-flight run for the same ref. | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Run tests and collect coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| # Persists the Gradle home incl. the build and configuration caches across runs. | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| with: | |
| cache-read-only: false | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Cache Kotlin/Native toolchain | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.konan | |
| key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle.kts') }} | |
| restore-keys: ${{ runner.os }}-konan- | |
| - name: Grant execute permission for Gradle | |
| run: chmod +x gradlew | |
| - name: Run linter | |
| run: ./gradlew lintDocs | |
| - name: Run tests with coverage | |
| run: ./gradlew allTests koverXmlReport | |
| - name: Upload test reports | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-reports | |
| path: | | |
| build/reports/tests/ | |
| build/test-results/ | |
| if-no-files-found: ignore | |
| - name: Upload results to Codecov (main only) | |
| if: github.ref == 'refs/heads/main' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: build/reports/kover/report.xml | |
| fail_ci_if_error: false |