Merge pull request #47 from halotukozak-com/renovate/actions-setup-ja… #122
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, master] | |
| pull_request: | |
| workflow_call: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v6 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Lint (ktlint) | |
| run: ./gradlew ktlintCheck --stacktrace | |
| - name: Public API check | |
| run: ./gradlew apiCheck --stacktrace | |
| - name: Build (jvm + ios) | |
| run: ./gradlew build --stacktrace | |
| - name: Coverage report | |
| if: always() | |
| run: ./gradlew koverXmlReport koverHtmlReport --stacktrace | |
| - name: Upload coverage artifact | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage | |
| path: build/reports/kover/ | |
| retention-days: 14 | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: build/reports/kover/report.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test reports | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-reports | |
| path: | | |
| **/build/reports/tests/ | |
| **/build/test-results/ | |
| retention-days: 7 |