name: Android CI (Merge Queue) on: merge_group: types: [checks_requested] concurrency: group: build-mq-${{ github.ref }} cancel-in-progress: true jobs: lint: if: github.repository == 'meshtastic/Meshtastic-Android' uses: ./.github/workflows/reusable-lint.yml secrets: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} build: needs: lint if: github.repository == 'meshtastic/Meshtastic-Android' uses: ./.github/workflows/reusable-android-build.yml with: upload_artifacts: false secrets: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} DATADOG_APPLICATION_ID: ${{ secrets.DATADOG_APPLICATION_ID }} DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} androidTest: needs: lint if: github.repository == 'meshtastic/Meshtastic-Android' uses: ./.github/workflows/reusable-android-test.yml with: api_levels: '[26, 35]' # Run on both API 26 and 35 for merge queue test_flavors: 'both' # Run both flavors for merge queue (comprehensive) upload_artifacts: false secrets: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} check-workflow-status: name: Check Workflow Status # Matches another in pull-request, and is required for merge to main. runs-on: ubuntu-latest needs: - lint - build - androidTest if: always() steps: - name: Check Workflow Status run: | exit_on_result() { if [[ "$2" == "failure" || "$2" == "cancelled" ]]; then echo "Job '$1' failed or was cancelled." exit 1 fi } exit_on_result "lint" "${{ needs.lint.result }}" exit_on_result "build" "${{ needs.build.result }}" exit_on_result "androidTest" "${{ needs.androidTest.result }}"