mirror of
https://github.com/hmalik144/Driver.git
synced 2026-03-18 07:26:03 +00:00
Local testing
This commit is contained in:
@@ -20,21 +20,12 @@ commands:
|
|||||||
git config --global user.email "$GIT_EMAIL"
|
git config --global user.email "$GIT_EMAIL"
|
||||||
git config --global user.name "$GIT_EMAIL"
|
git config --global user.name "$GIT_EMAIL"
|
||||||
git subtree add --prefix=driver_app_data https://github.com/hmalik144/driver_app_data main
|
git subtree add --prefix=driver_app_data https://github.com/hmalik144/driver_app_data main
|
||||||
# Added to prevent gradle build failures in pipeline
|
|
||||||
- android/create-keystore-properties:
|
|
||||||
release-keystore: "keystore.jks"
|
|
||||||
- android/restore-gradle-cache
|
|
||||||
- run:
|
|
||||||
name: Download Dependencies
|
|
||||||
command: |
|
|
||||||
sudo chmod +x ./gradlew
|
|
||||||
./gradlew androidDependencies
|
|
||||||
- android/save-gradle-cache
|
|
||||||
# Setup files for build.
|
# Setup files for build.
|
||||||
- run:
|
- run:
|
||||||
name: Setup variables for build
|
name: Setup variables for build
|
||||||
command: |
|
command: |
|
||||||
echo "$GOOGLE_SERVICES_KEY" > "app/google-services.json"
|
echo "$GOOGLE_SERVICES_KEY" > "app/google-services.json"
|
||||||
|
- android/restore-gradle-cache
|
||||||
run_tests:
|
run_tests:
|
||||||
description: run non-instrumentation tests for flavour specified
|
description: run non-instrumentation tests for flavour specified
|
||||||
parameters:
|
parameters:
|
||||||
@@ -47,6 +38,7 @@ commands:
|
|||||||
name: Run non-instrumentation unit tests
|
name: Run non-instrumentation unit tests
|
||||||
command: |
|
command: |
|
||||||
./gradlew test<< parameters.flavour >>DebugUnitTest --continue
|
./gradlew test<< parameters.flavour >>DebugUnitTest --continue
|
||||||
|
- android/save-gradle-cache
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: app/build/reports
|
path: app/build/reports
|
||||||
destination: reports
|
destination: reports
|
||||||
@@ -89,6 +81,7 @@ commands:
|
|||||||
paths:
|
paths:
|
||||||
- ~/.cache/firebase/emulators/
|
- ~/.cache/firebase/emulators/
|
||||||
key: emulator-cache-v1-{{ epoch }}
|
key: emulator-cache-v1-{{ epoch }}
|
||||||
|
- android/save-gradle-cache
|
||||||
# store test reports
|
# store test reports
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: app/build/reports/androidTests/connected
|
path: app/build/reports/androidTests/connected
|
||||||
@@ -118,11 +111,11 @@ commands:
|
|||||||
steps:
|
steps:
|
||||||
# The next step will run the unit tests
|
# The next step will run the unit tests
|
||||||
- run:
|
- run:
|
||||||
name: Setup keystore & properties
|
name: Setup keystore
|
||||||
command: |
|
command: |
|
||||||
FILE=$PWD/app/keystore.jks
|
echo "$BASE64_KEYSTORE" | base64 --decode > "app/keystore.jks"
|
||||||
echo "$BASE64_KEYSTORE" | base64 --decode > "$FILE"
|
- android/create-keystore-properties:
|
||||||
printf 'releaseKeyAlias=%s\nreleaseKeyPassword=%s\nreleaseKeyStore=%s\nreleaseStorePassword=%s' $RELEASE_KEY_ALIAS $RELEASE_KEY_PASSWORD $FILE $RELEASE_STORE_PASSWORD > keystore.properties
|
release-keystore: $PWD/app/keystore.jks
|
||||||
- run:
|
- run:
|
||||||
name: files list
|
name: files list
|
||||||
command: |
|
command: |
|
||||||
@@ -137,6 +130,7 @@ commands:
|
|||||||
command: |
|
command: |
|
||||||
pwd
|
pwd
|
||||||
bundle exec fastlane deploy<< parameters.flavour >>
|
bundle exec fastlane deploy<< parameters.flavour >>
|
||||||
|
- android/save-gradle-cache
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: fastlane/report.xml
|
path: fastlane/report.xml
|
||||||
# Define a job to be invoked later in a workflow.
|
# Define a job to be invoked later in a workflow.
|
||||||
|
|||||||
Reference in New Issue
Block a user