This commit is contained in:
parent
91b9afa096
commit
382b0b235c
2 changed files with 13 additions and 16 deletions
27
.drone.yml
27
.drone.yml
|
|
@ -3,38 +3,35 @@ type: docker
|
|||
name: android-build
|
||||
|
||||
steps:
|
||||
# Step 1: Build Debug APK
|
||||
- name: build-docker-image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: docker.gutierrezdequevedo.com
|
||||
repo: docker.gutierrezdequevedo.com/ps/mathstuff
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_COMMIT_SHA:0:7}
|
||||
|
||||
- name: build-debug
|
||||
image: cirrusci/android-sdk:33
|
||||
environment:
|
||||
GRADLE_USER_HOME: .gradle
|
||||
commands:
|
||||
- cd MathHomeworkHelper
|
||||
- echo "Building Debug APK..."
|
||||
- chmod +x ./gradlew
|
||||
- ./gradlew clean assembleDebug
|
||||
- gradle clean assembleDebug
|
||||
- echo "Debug APK built successfully!"
|
||||
|
||||
# Step 2: Build Release APK
|
||||
- name: build-release
|
||||
image: cirrusci/android-sdk:33
|
||||
environment:
|
||||
GRADLE_USER_HOME: .gradle
|
||||
commands:
|
||||
- cd MathHomeworkHelper
|
||||
- echo "Building Release APK..."
|
||||
- chmod +x ./gradlew
|
||||
- ./gradlew clean assembleRelease
|
||||
- gradle clean assembleRelease
|
||||
- echo "Release APK built successfully!"
|
||||
|
||||
# Step 3: Run Unit Tests
|
||||
- name: run-tests
|
||||
image: cirrusci/android-sdk:33
|
||||
environment:
|
||||
GRADLE_USER_HOME: .gradle
|
||||
commands:
|
||||
- cd MathHomeworkHelper
|
||||
- echo "Running unit tests..."
|
||||
- chmod +x ./gradlew
|
||||
- ./gradlew test
|
||||
- gradle test
|
||||
- echo "Tests completed!"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue