Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage-history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
.github/scripts/push_coverage_history.sh 'chore: record unit coverage'

# The emulator already ran on the pull request, so its artifact is reused
# instead of booting another macOS runner. It is usually still running at
# instead of booting another emulator. It is usually still running at
# merge time, so wait for it rather than recording the commit as having
# no instrumentation data at all.
- name: Wait for the pull request's emulator run
Expand Down
33 changes: 31 additions & 2 deletions .github/workflows/instrumentation-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,47 @@ on:
types: [test]
pull_request:
branches-ignore: ['gh-pages']
types: [opened, synchronize, reopened, ready_for_review]
# Changes that cannot affect the emulator tests. Workflow changes still run, so a bumped
# action is exercised before it merges.
paths-ignore:
- '**.md'
- 'docs/**'
- '.gemini/**'
- 'LICENSE'
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
- '.github/dependabot.yml'
workflow_dispatch:

# A new push to a pull request supersedes the run for the previous commit.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
run-instrumentation-test:
runs-on: macOS-latest-large # enables hardware acceleration in the virtual machine
# Skip drafts (the run starts when the pull request is marked ready for review) and
# release-please pull requests, which only change versions and the changelog.
if: >-
github.event.pull_request.draft != true &&
!startsWith(github.head_ref, 'release-please--')
# Ubuntu runners support KVM, so the emulator runs with hardware acceleration on a standard
# runner instead of a billed macOS larger runner.
runs-on: ubuntu-latest
permissions:
pull-requests: write
timeout-minutes: 45
steps:
- name: Checkout Repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- 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: Set up JDK 21
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
Expand All @@ -55,7 +84,7 @@ jobs:
with:
api-level: 29
target: google_apis
arch: x86
arch: x86_64
disable-animations: true
# The demo smoke tests run in their own workflow, see demo-smoke-test.yml.
script: ./gradlew createDebugCoverageReport :maps-app:createLibraryCoverageReports --stacktrace -Pandroid.testInstrumentationRunnerArguments.notPackage=com.google.maps.android.compose.smoke
Expand Down
Loading