improving ui #61
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
| # FILE: .github/workflows/ci.yml | |
| name: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Inject google-services.json | |
| env: | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| run: | | |
| if [ -n "$GOOGLE_SERVICES_JSON" ]; then | |
| echo "$GOOGLE_SERVICES_JSON" > app/google-services.json | |
| echo "Injected google-services.json from secret." | |
| else | |
| echo "WARNING: GOOGLE_SERVICES_JSON secret not set — using committed stub." | |
| fi | |
| - name: Build debug | |
| run: ./gradlew assembleDebug --stacktrace | |
| - name: Run unit tests | |
| run: ./gradlew testDebugUnitTest --stacktrace | |
| - name: Lint | |
| run: ./gradlew lintDebug --stacktrace | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: '**/build/reports/tests/' | |
| - name: Upload lint results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lint-results | |
| path: '**/build/reports/lint-results-debug.html' |