Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Test Configuration Sample #400

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0c9fdd2
[ConfigSample] Initial commit
JolandaVerhoef Sep 14, 2021
6f55b48
[ConfigSample] Add logging to gradle commands in Github Actions
JolandaVerhoef Sep 15, 2021
62d4253
[ConfigSample] Upgrade Gradle plugin and remove opt-in parameter
JolandaVerhoef Sep 16, 2021
d20a9b7
[ConfigSample] Change API level to 26 which is supported
JolandaVerhoef Sep 16, 2021
b121ae5
[ConfigSample] Try out caching
JolandaVerhoef Oct 6, 2021
a908ff1
[ConfigSample] Use wildcard in cache path
JolandaVerhoef Oct 7, 2021
1c5241b
[ConfigSample] Use ubuntu image as hardware acceleration is not needed
JolandaVerhoef Oct 7, 2021
7899cc5
[ConfigSample] Update versions
JolandaVerhoef Oct 26, 2021
d990d5e
[TestConfigurationSample] Upgrade to AGP alpha03
JolandaVerhoef Nov 9, 2021
728a4e5
[TestConfigurationSample] Upgrade to AGP alpha04
JolandaVerhoef Nov 10, 2021
5023df2
Revert "[ConfigSample] Use ubuntu image as hardware acceleration is n…
JolandaVerhoef Nov 10, 2021
2a4b086
[TestConfigurationSample] Provide emulator logs as artifact on failin…
JolandaVerhoef Nov 15, 2021
972c596
[TestConfigurationSample] Provide emulator logs as artifact on failin…
JolandaVerhoef Nov 15, 2021
dfb8fad
[TestConfigurationSample] Upgrade to AGP alpha06
JolandaVerhoef Dec 16, 2021
5f53fdf
[TestConfigurationSample] Upgrade to AGP alpha07
JolandaVerhoef Jan 13, 2022
9805b89
[TestConfigurationSample] Upgrade to AGP 7.3.0-alpha05
JolandaVerhoef Mar 9, 2022
339d550
[TestConfigurationSample] Upgrade to AGP 7.3.0-alpha06
JolandaVerhoef Mar 15, 2022
68819c2
[TestConfigurationSample] Upgrade to AGP 7.3.0-alpha07
JolandaVerhoef Mar 18, 2022
95c1e44
[TestConfigurationSample] Run GMD tasks with flag to disable hardware…
JolandaVerhoef Mar 18, 2022
ad8d6c7
[TestConfigurationSample] Change API26 to API27 as 26 is not supported
JolandaVerhoef Mar 18, 2022
9398a17
[TestConfigurationSample] Set max workers to 2 as per recommendation
JolandaVerhoef Mar 18, 2022
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
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
JolandaVerhoef marked this conversation as resolved.
Show resolved Hide resolved
~/.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)
}
}