Local testing

This commit is contained in:
2023-08-05 15:10:30 +01:00
parent 93ba23623c
commit b776165dfd

View File

@@ -26,6 +26,16 @@ commands:
command: |
echo "$GOOGLE_SERVICES_KEY" > "app/google-services.json"
- android/restore-gradle-cache
build_gradle:
description: Build the gradle
steps:
- android/restore-gradle-cache
- run:
name: Download Dependencies
command: |
sudo chmod +x ./gradlew
./gradlew androidDependencies
- android/save-gradle-cache
run_tests:
description: run non-instrumentation tests for flavour specified
parameters:
@@ -34,11 +44,11 @@ commands:
default: "Driver"
steps:
# The next step will run the unit tests
- build_gradle
- run:
name: Run non-instrumentation unit tests
command: |
./gradlew test<< parameters.flavour >>DebugUnitTest --continue
- android/save-gradle-cache
- store_artifacts:
path: app/build/reports
destination: reports
@@ -52,6 +62,7 @@ commands:
default: "AtlasWeather"
steps:
# Download and cache dependencies
- build_gradle
- restore_cache:
keys:
- emulator-cache-v1-
@@ -81,7 +92,6 @@ commands:
paths:
- ~/.cache/firebase/emulators/
key: emulator-cache-v1-{{ epoch }}
- android/save-gradle-cache
# store test reports
- store_artifacts:
path: app/build/reports/androidTests/connected
@@ -110,12 +120,8 @@ commands:
default: "Driver"
steps:
# The next step will run the unit tests
- run:
name: Setup keystore
command: |
echo "$BASE64_KEYSTORE" | base64 --decode > "app/keystore.jks"
- android/create-keystore-properties:
release-keystore: $PWD/app/keystore.jks
- android/decode-keystore:
keystore-location: $PWD/app/keystore.jks
- run:
name: files list
command: |
@@ -125,6 +131,7 @@ commands:
name: Setup playstore key
command: |
echo "$GOOGLE_PLAY_KEY" > "google-play-key.json"
- build_gradle
- run:
name: Run fastlane command to deploy to playstore
command: |