mirror of
https://github.com/hmalik144/Driver.git
synced 2025-12-10 02:45:20 +00:00
- config.yml updated
This commit is contained in:
@@ -9,26 +9,23 @@ version: 2.1
|
||||
orbs:
|
||||
android: circleci/android@2.3.0
|
||||
|
||||
# Define a job to be invoked later in a workflow.
|
||||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
||||
jobs:
|
||||
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
|
||||
build-and-test:
|
||||
# Parameters used for determining
|
||||
parameters:
|
||||
flavour:
|
||||
type: string
|
||||
default: "Driver"
|
||||
# These next lines define the Android machine image executor.
|
||||
# See: https://circleci.com/docs/2.0/executor-types/
|
||||
executor:
|
||||
name: android/android-machine
|
||||
tag: 2023.05.1
|
||||
# Add steps to the job
|
||||
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
|
||||
commands:
|
||||
setup_repo:
|
||||
description: checkout repo and android dependencies
|
||||
steps:
|
||||
# Checkout the code and its submodule as the first step.
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||
- run:
|
||||
name: Chmod permissions
|
||||
command: sudo chmod +x ./gradlew
|
||||
- run:
|
||||
name: Download Dependencies
|
||||
command: ./gradlew androidDependencies
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/.gradle
|
||||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||||
# config git user
|
||||
- run:
|
||||
name: Setup subtree for test data
|
||||
@@ -41,18 +38,43 @@ jobs:
|
||||
name: Setup variables for build
|
||||
command: |
|
||||
echo "$GOOGLE_SERVICES_KEY" > "app/google-services.json"
|
||||
- run:
|
||||
name: Grant execute permission for gradlew
|
||||
command: |
|
||||
chmod +x gradlew
|
||||
run_tests:
|
||||
description: run tests for flavour specified
|
||||
parameters:
|
||||
flavour:
|
||||
type: string
|
||||
default: "Driver"
|
||||
steps:
|
||||
# The next step will run the unit tests
|
||||
- android/run-tests:
|
||||
test-command: ./gradlew test<< parameters.flavour >>DebugUnitTest --continue
|
||||
- store_artifacts:
|
||||
path: app/build/reports
|
||||
destination: reports
|
||||
- store_test_results:
|
||||
path: app/build/test-results
|
||||
run_ui_tests:
|
||||
description: start firebase emulator and run ui tests for flavour specified
|
||||
parameters:
|
||||
flavour:
|
||||
type: string
|
||||
default: "AtlasWeather"
|
||||
steps:
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
keys:
|
||||
- emulator-cache-v1-
|
||||
# Install Firebase tools needed for firebase emulator
|
||||
- run:
|
||||
name: Install firebase tools
|
||||
command: |
|
||||
curl -sL firebase.tools | bash
|
||||
# Save cache for firebase tools
|
||||
- save_cache:
|
||||
paths:
|
||||
- .firebase/emulator
|
||||
- ~/.cache/firebase/emulators/
|
||||
key: emulator-cache-v1-{{ epoch }}
|
||||
# Then start firebase emulator in the background
|
||||
- run:
|
||||
name: Start firebase emulator
|
||||
@@ -92,6 +114,30 @@ jobs:
|
||||
# Then publish the results of the Instrumentation tests!
|
||||
- store_test_results:
|
||||
path: app/build/outputs/androidTest-results/connected
|
||||
# Define a job to be invoked later in a workflow.
|
||||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
|
||||
jobs:
|
||||
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
|
||||
build-and-test:
|
||||
# Parameters used for determining
|
||||
parameters:
|
||||
flavour:
|
||||
type: string
|
||||
default: "Driver"
|
||||
# These next lines define the Android machine image executor.
|
||||
# See: https://circleci.com/docs/2.0/executor-types/
|
||||
executor:
|
||||
name: android/android-machine
|
||||
tag: 2023.05.1
|
||||
# Add steps to the job
|
||||
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
|
||||
steps:
|
||||
# Checkout the code and its submodule as the first step.
|
||||
- setup_repo
|
||||
- run_tests:
|
||||
flavour: << parameters.flavour >>
|
||||
- run_ui_tests:
|
||||
flavour: << parameters.flavour >>
|
||||
# Assemble
|
||||
assemble-and-release:
|
||||
# Parameters used for determining
|
||||
@@ -103,6 +149,7 @@ jobs:
|
||||
name: android/android-machine
|
||||
tag: 2023.05.1
|
||||
steps:
|
||||
- setup_repo
|
||||
- run:
|
||||
name: Setup variables for release
|
||||
command: |
|
||||
|
||||
Reference in New Issue
Block a user