Skip to content

Commit

Permalink
[ConfigSample] Try out caching
Browse files Browse the repository at this point in the history
  • Loading branch information
JolandaVerhoef committed Oct 6, 2021
1 parent d20a9b7 commit b121ae5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 52 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/TestConfigurationSample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:

gradleManagedVirtualDevicesTest:
needs: build
runs-on: macOS-latest # enables hardware acceleration in the virtual machine
timeout-minutes: 90
runs-on: macos-latest
timeout-minutes: 30

steps:
- name: Checkout
Expand All @@ -62,7 +62,7 @@ jobs:
with:
java-version: 11

- name: Generate cache key
- name: Generate cache key for Gradle cache
run: ./scripts/checksum.sh $SAMPLE_PATH checksum.txt

- uses: actions/cache@v2
Expand All @@ -73,25 +73,25 @@ jobs:
~/.gradle/caches/build-cache-*
key: gradle-${{ hashFiles('checksum.txt') }}

- name: AVD cache
- name: Cache pixel2api29 system image
uses: actions/cache@v2
id: avd-cache
with:
path: |
~/.android/gradle/avd/*
key: avd
~/.android/gradle/avd/dev29_aosp_x86_Pixel_2.ini
~/.android/gradle/avd/dev29_aosp_x86_Pixel_2.avd
key: pixel2api29

- name: Run all tests
working-directory: ${{ env.SAMPLE_PATH }}
run: ./gradlew -i pixel2api29DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.example.android.testing.testconfigurationsample.TestDeviceLargeScreen

- name: Run regression tests
working-directory: ${{ env.SAMPLE_PATH }}
run: ./gradlew -i pixel2api26DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.example.android.testing.testconfigurationsample.TestDeviceApi26

- name: Run large screen tests
working-directory: ${{ env.SAMPLE_PATH }}
run: ./gradlew -i nexus9api29DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.example.android.testing.testconfigurationsample.TestDeviceLargeScreen
run: ./gradlew pixel2api29DebugAndroidTest

# - name: Run regression tests
# working-directory: ${{ env.SAMPLE_PATH }}
# run: ./gradlew -i pixel2api26DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.example.android.testing.testconfigurationsample.TestDeviceApi26
#
# - name: Run large screen tests
# working-directory: ${{ env.SAMPLE_PATH }}
# run: ./gradlew -i nexus9api29DebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.annotation=com.example.android.testing.testconfigurationsample.TestDeviceLargeScreen

- name: Upload test reports
if: always()
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
import org.junit.Assert
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
Expand Down Expand Up @@ -70,6 +69,6 @@ class MainActivityTests {
fun regressionTestKnownIssueApi26() {
// Add instrumented tests here
runBlocking { delay(10000) }
Assert.assertTrue(true)
assertTrue(true)
}
}

0 comments on commit b121ae5

Please sign in to comment.