fix: Improve formatting in feature scaffolding templates #8
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 ] | |
| workflow_dispatch: | |
| # Cancel previous runs if a new one is started | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout code | |
| 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: Create google-services.json | |
| run: | | |
| echo "${{ secrets.GOOGLE_SERVICES_JSON }}" > app/google-services.json | |
| - name: Build with Gradle | |
| run: ./gradlew build --no-daemon --stacktrace | |
| - name: Run unit tests | |
| run: ./gradlew test --no-daemon --stacktrace | |
| - name: Run Detekt | |
| run: ./gradlew detekt --no-daemon --stacktrace | |
| - name: Upload build reports | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-reports | |
| path: | | |
| **/build/reports/ | |
| **/build/test-results/ | |
| retention-days: 7 | |
| lint: | |
| name: Lint Check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| 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: Run Android Lint | |
| run: ./gradlew lint --no-daemon --stacktrace | |
| - name: Upload lint reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lint-reports | |
| path: | | |
| **/build/reports/lint-results*.html | |
| **/build/reports/lint-results*.xml | |
| retention-days: 7 | |
| assemble-release: | |
| name: Assemble Release Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout code | |
| 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: Assemble Dev Release APK | |
| run: ./gradlew assembleDevRelease --no-daemon --stacktrace | |
| - name: Assemble Prod Release APK | |
| run: ./gradlew assembleProdRelease --no-daemon --stacktrace | |
| - name: Upload Dev Release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dev-release-apk | |
| path: app/build/outputs/apk/dev/release/*.apk | |
| retention-days: 14 | |
| - name: Upload Prod Release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: prod-release-apk | |
| path: app/build/outputs/apk/prod/release/*.apk | |
| retention-days: 14 | |