forked from arildojr7/iris-mock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:arildojr7/iris-mock into dev
# Conflicts: # sample/build.gradle.kts
- Loading branch information
Showing
41 changed files
with
409 additions
and
954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,12 @@ jobs: | |
- name: Run checks | ||
run: ./gradlew ktlintCheck | ||
|
||
unit-tests: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
|
@@ -34,10 +36,76 @@ jobs: | |
- name: Setup gradle | ||
uses: gradle/[email protected] | ||
|
||
- name: Run unit tests | ||
run: ./gradlew test | ||
- name: Build iris-mock | ||
run: ./gradlew :iris-mock:publishToMavenLocal | ||
|
||
build: | ||
- name: Build iris-mock-plugin | ||
run: ./gradlew :iris-mock-plugin:publishToMavenLocal | ||
|
||
- name: Build iris-mock-compiler | ||
run: ./gradlew :iris-mock-compiler:publishToMavenLocal | ||
|
||
- name: Build app sample | ||
run: ./gradlew :sample:assembleDebug | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-sample | ||
path: sample/build/outputs/apk/debug/sample-debug.apk | ||
|
||
ui-tests: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
strategy: | ||
matrix: | ||
api-level: [29] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: app-sample | ||
|
||
- name: Enable KVM | ||
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 | ||
- name: AVD cache | ||
uses: actions/cache@v4 | ||
id: avd-cache | ||
with: | ||
path: | | ||
~/.android/avd/* | ||
~/.android/adb* | ||
key: avd-${{ matrix.api-level }} | ||
|
||
- name: Create AVD and generate snapshot for caching | ||
if: steps.avd-cache.outputs.cache-hit != 'true' | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
force-avd-creation: false | ||
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disable-animations: false | ||
script: echo "Generated AVD snapshot for caching." | ||
|
||
- name: Run UI tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
force-avd-creation: false | ||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
disable-animations: true | ||
script: | | ||
adb uninstall dev.arildo.iris.mock || true | ||
adb install sample-debug.apk | ||
curl -Ls "https://get.maestro.mobile.dev" | bash | ||
$HOME/.maestro/bin/maestro test .maestro/ | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -50,11 +118,5 @@ jobs: | |
- name: Setup gradle | ||
uses: gradle/[email protected] | ||
|
||
- name: Build iris-mock | ||
run: ./gradlew :iris-mock:assemble | ||
|
||
- name: Build iris-mock-plugin | ||
run: ./gradlew :iris-mock-plugin:assemble | ||
|
||
- name: Build app sample | ||
run: ./gradlew :sample:assembleDebug | ||
- name: Run unit tests | ||
run: ./gradlew test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
appId: dev.arildo.iris.mock | ||
--- | ||
- launchApp | ||
- assertVisible: "Intercepted!" | ||
- assertVisible: "Intercepted!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
[versions] | ||
kotlin = "1.9.10" | ||
agp = "8.3.0" | ||
okhttp = "3.14.9" | ||
okio = "2.8.0" | ||
asm = "9.6" | ||
buildconfig = "3.0.3" | ||
gradlePublish = "1.2.1" | ||
ktlintPlugin = "11.3.2" | ||
autoService = "1.1.1" | ||
irisMock = "1.1.0-alpha04" | ||
androidx-appcompat = "1.6.1" | ||
androidx-core = "1.12.0" | ||
androidx-material = "1.11.0" | ||
retrofit = "2.9.0" | ||
retrofitGson = "2.7.1" | ||
androidx-constraintLayout = "2.1.4" | ||
androidx-lifecycle = "2.7.0" | ||
coroutinesCore = "1.7.3" | ||
serializationJson = "1.5.1" | ||
junit = "5.10.2" | ||
mockk = "1.13.5" | ||
|
||
[libraries] | ||
agp420 = { module = "com.android.tools.build:gradle", version = "4.2.0" } | ||
agp710 = { module = "com.android.tools.build:gradle", version = "7.1.0" } | ||
agp722 = { module = "com.android.tools.build:gradle", version = "7.2.2" } | ||
|
||
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } | ||
androidx-material = { module = "com.google.android.material:material", version.ref = "androidx-material" } | ||
androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx-core" } | ||
androidx-constraintLayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintLayout" } | ||
androidx-lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" } | ||
|
||
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutinesCore" } | ||
kotlinx-serialization = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serializationJson" } | ||
|
||
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } | ||
retrofitGson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofitGson" } | ||
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } | ||
okio = { module = "com.squareup.okio:okio", version.ref = "okio" } | ||
|
||
asm-core = { module = "org.ow2.asm:asm", version.ref = "asm" } | ||
asm-util = { module = "org.ow2.asm:asm-util", version.ref = "asm" } | ||
asm-commons = { module = "org.ow2.asm:asm-commons", version.ref = "asm" } | ||
|
||
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } | ||
kotlin-compiler = { module = "org.jetbrains.kotlin:kotlin-compiler-embeddable", version.ref = "kotlin" } | ||
|
||
autoService-processor = { module = "com.google.auto.service:auto-service", version.ref = "autoService" } | ||
autoService-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" } | ||
|
||
test-junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } | ||
test-mockk = { module = "io.mockk:mockk", version.ref = "mockk" } | ||
|
||
[bundles] | ||
asm = ["asm-core", "asm-commons", "asm-util"] | ||
|
||
[plugins] | ||
application = { id = "com.android.application", version.ref = "agp" } | ||
library = { id = "com.android.library", version.ref = "agp" } | ||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } | ||
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } | ||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" } | ||
gradlePublish = { id = "com.gradle.plugin-publish", version.ref = "gradlePublish" } | ||
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlintPlugin" } | ||
irisMock = { id = "dev.arildo.iris-mock-plugin", version.ref = "irisMock" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri May 12 16:18:12 CEST 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
iris-mock-compiler/src/main/kotlin/dev/arildo/iris/plugin/WrapperCodeGenerator.kt
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
iris-mock-compiler/src/main/kotlin/dev/arildo/iris/plugin/codegen/AnnotatedReference.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.