Fix the expanded TextField #203
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 and Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| # Ensure that only the latest commit is tested for PRs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_test_lint: | |
| name: "Build, Test, and Lint" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| permissions: | |
| contents: write # Needed for git-auto-commit-action | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| # Add cache-encryption-key if you set up the GRADLE_ENCRYPTION_KEY secret | |
| # with: | |
| # cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Apply Spotless | |
| run: ./gradlew spotlessApply | |
| - name: Commit Spotless changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: 🤖 Apply Spotless formatting | |
| file_pattern: '**/*.kt **/*.kts **/*.java **/*.xml' | |
| - name: Build debug APK | |
| run: ./gradlew assembleDebug --no-configuration-cache | |
| - name: Run local unit tests | |
| run: ./gradlew testDebugUnitTest | |
| - name: Check lint | |
| run: ./gradlew lintDebug | |
| - name: Upload build outputs (APKs) | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: APKs | |
| path: '**/build/outputs/apk/debug/*.apk' | |
| - name: Upload JVM local test results (XML) | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: local-test-results | |
| path: '**/build/test-results/test*UnitTest/TEST-*.xml' | |
| - name: Upload lint reports (HTML) | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lint-reports-html | |
| path: '**/build/reports/lint-results-debug.html' | |
| androidTest: | |
| name: "Instrumentation Tests (emulator)" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| api-level: [26] | |
| steps: | |
| - name: Delete unnecessary tools 🔧 | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| with: | |
| android: false # Don't remove Android tools | |
| tool-cache: true # Remove image tool cache | |
| dotnet: true | |
| haskell: true | |
| swap-storage: true | |
| - name: Enable KVM group perms | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build projects and run instrumentation tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ matrix.api-level }} | |
| arch: x86 | |
| disable-animations: true | |
| disk-size: 6000M | |
| heap-size: 600M | |
| script: ./gradlew connectedDebugAndroidTest | |
| - name: Upload test reports | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports-${{ matrix.api-level }} | |
| path: '**/build/reports/androidTests' |