Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
klalumiere committed Jun 16, 2024
1 parent a45a660 commit 38c6941
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Enable KVM group perms
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
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Tests
uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32
with:
api-level: 33
api-level: 29
script: |
./gradlew test
./gradlew connectedAndroidTest
Expand Down
13 changes: 13 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.view.ViewGroup
import androidx.activity.result.ActivityResultRegistry
import androidx.activity.result.contract.ActivityResultContract
import androidx.core.app.ActivityOptionsCompat
import androidx.lifecycle.Lifecycle
import androidx.recyclerview.widget.RecyclerView
import androidx.test.core.app.ApplicationProvider
import androidx.test.core.app.launchActivity
Expand All @@ -26,6 +27,9 @@ import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.runner.lifecycle.ActivityLifecycleMonitorRegistry
import androidx.test.runner.lifecycle.Stage
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.runTest
import org.hamcrest.CoreMatchers.not
import org.hamcrest.Description
import org.hamcrest.Matcher
Expand Down Expand Up @@ -123,8 +127,9 @@ class EndToEndTest {
}
}

@OptIn(ExperimentalCoroutinesApi::class)
@Test
fun canRenderSong() {
fun canRenderSong() = runTest(UnconfinedTestDispatcher()) {
val intent = Intent(context, SongActivity::class.java).apply {
putExtra(SongActivity.SONG_NAME, "Happy Birthday")
putExtra(SongActivity.SONG_URI_AS_STRING, assetUri.toString())
Expand Down

0 comments on commit 38c6941

Please sign in to comment.