SWADroid/.drone.yml
Amab a3beeeebef
All checks were successful
continuous-integration/drone/push Build is passing
Enable Drone CI cache (#424)
## What changes were proposed in this pull request?

 Enable Drone CI cache.

## How was this patch tested?

CI/CD.

Reviewed-on: #424
Co-authored-by: Amab <juanmi1982@gmail.com>
Co-committed-by: Amab <juanmi1982@gmail.com>
2023-10-21 21:42:32 +02:00

59 lines
1.5 KiB
YAML

kind: pipeline
type: docker
name: default
steps:
- name: restore-cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- .gradle/caches
- .gradle/wrapper
volumes:
- name: cache
path: /cache
- name: fetch-tags
image: drone/git:latest
commands:
- git fetch --tags
- name: build & test
image: git.cuernodehipnos.es/marown/android-sdk-docker:latest
privileged: true
environment:
GRADLE_USER_HOME: /drone/src/.gradle
commands:
# Create and run emulator
- echo "no" | avdmanager --verbose create avd --force --name "generic_34" --package "system-images;android-34;google_apis;x86_64" --tag "google_apis" --abi "x86_64"
- emulator -avd "generic_34" -no-window -no-audio -no-boot-anim -netdelay none -no-snapshot -wipe-data -partition-size 1024 &
# Wait for emulator to be ready
- android-wait-for-emulator.sh
# Run tests
- ./gradlew connectedCheck -i
#- name: code-analysis
# image: drone-plugins/sonarqube-scanner:latest
# settings:
# sonar_host:
# from_secret: sonar_host
# sonar_token:
# from_secret: sonar_token
- name: rebuild-cache
image: drillster/drone-volume-cache
settings:
rebuild: true
mount:
- .gradle/caches
- .gradle/wrapper
volumes:
- name: cache
path: /cache
volumes:
- name: cache
host:
path: /share/CACHEDEV1_DATA/homes/admin/drone/cache