Skip to content

Commit

Permalink
complete android github actions test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Nov 9, 2023
1 parent 09c255d commit 2283be6
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Job set up
uses: ./.github/actions/job-set-up

- run: ./gradlew clean testDebug -p NoiseCapture/
- run: ./gradlew :NoiseCapture:cleanTestDebugUnitTest :NoiseCapture:testDebugUnitTest

iOS:
# if: ${{ inputs.shouldRunKmp == 'true' || inputs.shouldRunIos == 'true' }}
Expand Down
11 changes: 11 additions & 0 deletions NoiseCapture/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ android {
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
}
testOptions {
managedDevices {
allDevices {
create<com.android.build.api.dsl.ManagedVirtualDevice>("api31") {
device = "Pixel 6"
apiLevel = 31
systemImageSource = "aosp"
}
}
}
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.noise_planet.noisecapture

import Greeting
import org.junit.Assert.assertTrue
import org.junit.Test

class AndroidGreetingTest {

@Test
fun testExample() {
assertTrue("Check Android is mentioned", Greeting().greet().contains("Android"))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.noise_planet.noisecapture

import Greeting
import kotlin.test.Test
import kotlin.test.assertTrue

class IosGreetingTest {

@Test
fun testExample() {
assertTrue(Greeting().greet().contains("iOS"), "Check iOS is mentioned")
}
}

0 comments on commit 2283be6

Please sign in to comment.