Refactor/critical fixes #1
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: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Plugin unit tests | |
| run: ./gradlew :plugin:test :plugin:jacocoTestReport :plugin:jacocoTestCoverageVerification :plugin:detekt --no-daemon | |
| - name: Plugin integration tests (optional) | |
| continue-on-error: true | |
| run: ./gradlew :plugin:integrationTest --no-daemon | |
| - name: Sample app assembleDebug | |
| run: ./gradlew :app:assembleDebug --no-daemon | |
| - name: Performance non-regression check (assembleDebug) | |
| env: | |
| PERF_MAX_SECONDS: "240" | |
| run: | | |
| ./gradlew :app:clean --no-daemon | |
| ./gradlew :app:assembleDebug --no-daemon | |
| start=$(date +%s) | |
| ./gradlew :app:assembleDebug --no-daemon | |
| end=$(date +%s) | |
| elapsed=$((end - start)) | |
| echo "Measured assembleDebug (warm) time: ${elapsed}s" | |
| if [ "$elapsed" -gt "$PERF_MAX_SECONDS" ]; then | |
| echo "Performance regression: ${elapsed}s > ${PERF_MAX_SECONDS}s" | |
| exit 1 | |
| fi | |
| agp-compat: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| agp-version: ["8.0.2", "8.7.3", "9.0.0"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Set AGP version in version catalog | |
| run: sed -i.bak 's/^agp = ".*"/agp = "${{ matrix.agp-version }}"/' gradle/libs.versions.toml | |
| - name: AGP compatibility check (assembleDebug) | |
| run: ./gradlew :app:assembleDebug --no-daemon |