Skip to content

chore(deps): weekly minor and patch dependency updates #36

chore(deps): weekly minor and patch dependency updates

chore(deps): weekly minor and patch dependency updates #36

Workflow file for this run

# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Opens every ApiDemos demo on an emulator and checks that it starts, its map or panorama loads,
# and it survives a zoom and a configuration change. The tests live in the `smoke` package of each
# app's androidTest sources and are excluded from the instrumentation workflow.
#
# Like the instrumentation workflow, this needs the ACTIONS_API_KEY secret and is skipped
# without it.
name: Demo smoke test
on:
pull_request:
branches-ignore: ['gh-pages']
workflow_dispatch:
permissions:
contents: read
jobs:
# secrets cannot be referenced from a job-level `if`, so the presence of the
# key is resolved here and published as an output the emulator job gates on.
check-api-key:
runs-on: ubuntu-latest
outputs:
has-key: ${{ steps.check.outputs.has-key }}
steps:
- name: Check for Maps API key
id: check
env:
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }}
run: |
if [ -n "$MAPS_API_KEY" ]; then
echo "has-key=true" >> "$GITHUB_OUTPUT"
else
echo "has-key=false" >> "$GITHUB_OUTPUT"
echo "::notice::ACTIONS_API_KEY is not set; skipping the demo smoke test."
fi
demo-smoke-test:
needs: check-api-key
if: needs.check-api-key.outputs.has-key == 'true'
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- module: ':ApiDemos:java-app'
path: ApiDemos/project/java-app
smoke-package: com.example.mapdemo.smoke
- module: ':ApiDemos:kotlin-app'
path: ApiDemos/project/kotlin-app
smoke-package: com.example.kotlindemos.smoke
steps:
- name: Checkout Repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK 21
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
- name: Enable KVM
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: Inject Maps API key
env:
MAPS_API_KEY: ${{ secrets.ACTIONS_API_KEY }}
run: echo "MAPS_API_KEY=$MAPS_API_KEY" >> ./secrets.properties
- name: Build demo and test APKs
run: ./gradlew ${{ matrix.module }}:assembleDebug ${{ matrix.module }}:assembleDebugAndroidTest --stacktrace
- name: Run demo smoke test
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0
with:
# Emulators never update Google Play services, so the image's bundled version is what
# the maps run on. Older images bundle a version where adding advanced markers crashes
# inside Play services. API 36 images bundle 25.26, which works.
api-level: 36
target: google_apis
arch: x86_64
disable-animations: true
script: >-
./gradlew ${{ matrix.module }}:connectedDebugAndroidTest --stacktrace
-Pandroid.testInstrumentationRunnerArguments.package=${{ matrix.smoke-package }}
-Pandroid.testInstrumentationRunnerArguments.requireMapLoaded=true
- name: Upload test reports
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: demo-smoke-test-reports-${{ strategy.job-index }}
path: |
${{ matrix.path }}/build/reports/androidTests
${{ matrix.path }}/build/outputs/androidTest-results
if-no-files-found: warn