Repository navigation
Build: add cache-safe QA Firebase config task #152
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: Localization Validation | |
| on: | |
| push: | |
| branches: | |
| - feature/firebase-remote-localization | |
| workflow_dispatch: | |
| concurrency: | |
| group: localization-validation | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Make Gradle wrapper executable | |
| run: chmod +x gradlew | |
| - name: Verify localization architecture | |
| shell: bash | |
| run: | | |
| if grep -R --line-number --include='*.kt' 'Res\.string' app core data domain infrastructure model ui; then | |
| echo 'Found remaining Compose Res.string usage.' | |
| exit 1 | |
| fi | |
| if grep -R --line-number --include='*.kt' 'org\.jetbrains\.compose\.resources\.stringResource' app core data domain infrastructure model ui; then | |
| echo 'Found remaining JetBrains Compose stringResource import.' | |
| exit 1 | |
| fi | |
| if grep -R --line-number --include='*.kt' 'com\.google\.firebase\.remoteconfig\.FirebaseRemoteConfig' data/localization; then | |
| echo 'Localization app code must use the common KMP Remote Config API.' | |
| exit 1 | |
| fi | |
| if grep -R --line-number --include='*.kt' 'dev\.gitlive\.firebase' data/localization; then | |
| echo 'Found obsolete GitLive localization integration.' | |
| exit 1 | |
| fi | |
| if [ -d data/firebase ]; then | |
| echo 'Obsolete data/firebase module still exists.' | |
| exit 1 | |
| fi | |
| if find core/core-resource/src -type f -name '*.kt' | grep -q .; then | |
| echo 'core-resource must contain raw resources only.' | |
| find core/core-resource/src -type f -name '*.kt' | |
| exit 1 | |
| fi | |
| - name: Validate localization publishing script | |
| shell: pwsh | |
| run: ./scripts/firebase/publish-localization.ps1 -ValidateOnly | |
| - name: Verify QA maps to Develop Firebase client | |
| shell: bash | |
| run: | | |
| trap 'rm -f app/android/google-services.json' EXIT | |
| cat > app/android/google-services.json <<'JSON' | |
| { | |
| "project_info": { | |
| "project_number": "1", | |
| "project_id": "firebase-mapping-test" | |
| }, | |
| "client": [ | |
| { | |
| "client_info": { | |
| "mobilesdk_app_id": "1:1:android:develop-test", | |
| "android_client_info": { | |
| "package_name": "com.velord.composescreenexample.develop" | |
| } | |
| }, | |
| "api_key": [ | |
| { | |
| "current_key": "test-api-key" | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| JSON | |
| ./gradlew :app:android:processQaDebugGoogleServices --stacktrace | |
| - name: Compile and test localization | |
| run: >- | |
| ./gradlew | |
| :data:localization:desktopTest | |
| :infrastructure:di:desktopTest | |
| :app:desktop:compileKotlinDesktop | |
| :app:android:compileDevelopDebugKotlin | |
| -x :app:android:processDevelopDebugGoogleServices | |
| --stacktrace | |
| - name: Compile QA | |
| run: >- | |
| ./gradlew | |
| :app:android:compileQaDebugKotlin | |
| -x :app:android:processQaDebugGoogleServices | |
| --stacktrace | |
| - name: Compile Stage | |
| run: >- | |
| ./gradlew | |
| :app:android:compileStageDebugKotlin | |
| -x :app:android:processStageDebugGoogleServices | |
| --stacktrace | |
| - name: Compile Production | |
| run: >- | |
| ./gradlew | |
| :app:android:compileProductionDebugKotlin | |
| -x :app:android:processProductionDebugGoogleServices | |
| --stacktrace |