Skip to content

Commit

Permalink
chore(build): update Java version to 17 in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lemnik committed Apr 25, 2024
1 parent e20e1be commit 04dc943
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ env:

jobs:
android:
runs-on: macos-latest
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
api-level:
- 29
- 33

steps:
- uses: actions/checkout@v3
Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Gradle cache
uses: gradle/gradle-build-action@v2
Expand All @@ -34,15 +34,17 @@ jobs:
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
arch: x86_64
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
emulator-options: -no-window -noaudio -no-boot-anim -camera-back none -feature -Vulkan
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- name: Run Tests
uses: reactivecircus/android-emulator-runner@v2
with:
arch: x86_64
api-level: ${{ matrix.api-level }}
script: ./gradlew connectedCheck -x :bugsnag-benchmarks:connectedCheck
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
Expand Down Expand Up @@ -34,6 +36,7 @@ public class MemoryTrimTest {
@Test
public void onLowMemoryEvent() {
when(context.getApplicationContext()).thenReturn(context);
doNothing().when(context).registerComponentCallbacks(any());
Client client = new Client(context, BugsnagTestUtils.generateConfiguration());

// block until observer is registered
Expand Down

0 comments on commit 04dc943

Please sign in to comment.