Circleci fix (#18)

- test fixes
This commit is contained in:
2023-08-07 18:31:01 +01:00
committed by GitHub
parent 6e3e597717
commit a07012f247
4 changed files with 47 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ commands:
default: "AtlasWeather" default: "AtlasWeather"
steps: steps:
# The next step will run the unit tests # The next step will run the unit tests
# - build_gradle - build_gradle
- run: - run:
name: Run non-instrumentation unit tests name: Run non-instrumentation unit tests
command: | command: |
@@ -50,7 +50,7 @@ commands:
type: string type: string
default: "AtlasWeather" default: "AtlasWeather"
steps: steps:
# - build_gradle - build_gradle
- android/start-emulator-and-run-tests: - android/start-emulator-and-run-tests:
post-emulator-launch-assemble-command: ./gradlew assemble<< parameters.flavour >>DebugAndroidTest post-emulator-launch-assemble-command: ./gradlew assemble<< parameters.flavour >>DebugAndroidTest
test-command: ./gradlew connected<< parameters.flavour >>DebugAndroidTest test-command: ./gradlew connected<< parameters.flavour >>DebugAndroidTest
@@ -58,6 +58,7 @@ commands:
pull-data: true pull-data: true
pull-data-path: /storage/emulated/0/Android/data/ pull-data-path: /storage/emulated/0/Android/data/
pull-data-target: ~/app-data pull-data-target: ~/app-data
restore-gradle-cache-prefix: v1a
# store test reports # store test reports
- store_artifacts: - store_artifacts:
path: app/build/reports/androidTests/connected path: app/build/reports/androidTests/connected
@@ -66,6 +67,8 @@ commands:
- store_artifacts: - store_artifacts:
path: ~/app-data path: ~/app-data
destination: screenshots destination: screenshots
- store_test_results:
path: app/build/outputs/androidTest-results/connected
deploy_to_play_store: deploy_to_play_store:
description: deploy to playstore based on flavour description: deploy to playstore based on flavour
parameters: parameters:
@@ -80,7 +83,7 @@ commands:
name: Setup playstore key name: Setup playstore key
command: | command: |
echo "$GOOGLE_PLAY_KEY" > "google-play-key.json" echo "$GOOGLE_PLAY_KEY" > "google-play-key.json"
# - build_gradle - build_gradle
- run: - run:
name: Run fastlane command to deploy to playstore name: Run fastlane command to deploy to playstore
command: | command: |

View File

@@ -29,6 +29,19 @@
</AndroidTestResultsTableState> </AndroidTestResultsTableState>
</value> </value>
</entry> </entry>
<entry key="-409920851">
<value>
<AndroidTestResultsTableState>
<option name="preferredColumnWidths">
<map>
<entry key="Duration" value="90" />
<entry key="Pixel_2_API_27" value="120" />
<entry key="Tests" value="360" />
</map>
</option>
</AndroidTestResultsTableState>
</value>
</entry>
<entry key="170536241"> <entry key="170536241">
<value> <value>
<AndroidTestResultsTableState> <AndroidTestResultsTableState>
@@ -55,6 +68,19 @@
</AndroidTestResultsTableState> </AndroidTestResultsTableState>
</value> </value>
</entry> </entry>
<entry key="408375334">
<value>
<AndroidTestResultsTableState>
<option name="preferredColumnWidths">
<map>
<entry key="Duration" value="90" />
<entry key="Pixel_2_API_27" value="120" />
<entry key="Tests" value="360" />
</map>
</option>
</AndroidTestResultsTableState>
</value>
</entry>
<entry key="1127175145"> <entry key="1127175145">
<value> <value>
<AndroidTestResultsTableState> <AndroidTestResultsTableState>
@@ -68,6 +94,19 @@
</AndroidTestResultsTableState> </AndroidTestResultsTableState>
</value> </value>
</entry> </entry>
<entry key="1256180664">
<value>
<AndroidTestResultsTableState>
<option name="preferredColumnWidths">
<map>
<entry key="Duration" value="90" />
<entry key="Pixel_2_API_27" value="120" />
<entry key="Tests" value="360" />
</map>
</option>
</AndroidTestResultsTableState>
</value>
</entry>
</map> </map>
</option> </option>
</component> </component>

View File

@@ -55,8 +55,8 @@ open class BaseTest<A : Activity>(
scenario = ActivityScenario.launch(startIntent) scenario = ActivityScenario.launch(startIntent)
scenario.onActivity { scenario.onActivity {
testActivity = it testActivity = it
afterLaunch()
} }
afterLaunch()
} }
fun stubEndpoint(url: String, stub: Stubs) { fun stubEndpoint(url: String, stub: Stubs) {

View File

@@ -1,4 +1,4 @@
package com.appttude.h_mal.atlas_weather.data.location package com.appttude.h_mal.atlas_weather.instrumentationTests
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4