chore: initial commit #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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }} | |
| GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }} | |
| GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }} | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Run spotlessCheck and detekt | |
| run: ./gradlew spotlessCheck detekt --stacktrace | |
| test-jvm: | |
| name: Test JVM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Run JVM tests and verify coverage | |
| run: ./gradlew jvmTest koverVerify --stacktrace | |
| - name: Generate coverage report | |
| if: always() | |
| run: ./gradlew koverXmlReport --stacktrace | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: library/build/reports/kover/report.xml | |
| flags: jvm | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| test-native-linux: | |
| name: Test Native Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Run Linux native tests | |
| run: ./gradlew :library:linuxX64Test --stacktrace | |
| test-native-macos: | |
| name: Test Native macOS | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Run macOS and iOS simulator tests | |
| run: ./gradlew :library:macosArm64Test :library:iosSimulatorArm64Test --stacktrace | |
| test-wasm: | |
| name: Test wasmJs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Run wasmJs browser tests | |
| run: ./gradlew wasmJsBrowserTest --stacktrace | |
| test-windows: | |
| name: Test Windows | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Run Windows native tests | |
| shell: bash | |
| run: ./gradlew :library:mingwX64Test --stacktrace | |
| api-check: | |
| name: API Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Run API compatibility check | |
| run: ./gradlew apiCheck --stacktrace | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: [lint, test-jvm, test-native-linux, test-native-macos, test-wasm, test-windows, api-check] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: ./.github/actions/gradle-setup | |
| with: | |
| cache_read_only: ${{ github.event_name == 'pull_request' }} | |
| - name: Build | |
| run: ./gradlew build --stacktrace |