Skip to content

Commit

Permalink
ci: add android bridge unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercy811 committed Feb 23, 2024
1 parent 09a870d commit 27c46a9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Android Bridge Unit Test

on: [pull_request]

jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- uses: actions/checkout@v3
- name: Unit Test
run: cd android && ./gradlew testDebugUnitTest
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test and Lint
name: Flutter Test and Lint

on: [pull_request]

Expand Down
8 changes: 8 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,13 @@ dependencies {
testImplementation "io.mockk:mockk:1.12.4"
testImplementation "io.mockk:mockk-agent-jvm:1.11.0"
testImplementation('junit:junit:4.13')
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.7.2")
testImplementation 'org.robolectric:robolectric:4.8.2'
}

tasks.withType(Test) {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}

0 comments on commit 27c46a9

Please sign in to comment.