Hello,
I've been trying to use bitbucket pipelines to run unit tests in our Android app, but it seems to take way longer than it does locally!
Running locally takes 1 - 2 mints, but running the pipeline takes more than 10 mints!
I'm kinda new to this, so I'm not sure what might need to be cached for example.
Troubleshooting steps:
- mavenbut diving in the logs it says the following:
- gradle
- gradlewrapper
Cache "maven": Downloading
Cache "maven": Not found
Cache "gradle": Downloading
Cache "gradle": Downloaded 175.7 MiB in 4 seconds
Cache "gradle": Extracting
Cache "gradle": Extracted in 1 seconds
Cache "gradlewrapper": Downloading
Cache "gradlewrapper": Downloaded 250.8 MiB in 3 seconds
Cache "gradlewrapper": Extracting
Cache "gradlewrapper": Extracted in 2 seconds
So it doesn't seem like it was able to find maven, and I'm not sure if it found gradle or gradlewrapper as it says that it downloaded it anyway, am I understanding this incorrectly?
Downloading https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.6.1/gradle-3.6.1.pom to /tmp/gradle_download7798585966449624531bin
Downloading https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.6.1/gradle-api-3.6.1.pom to /tmp/gradle_download2641349456454810231bin
Downloading https://jcenter.bintray.com/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom to /tmp/gradle_download2316242642219741151bin
My pipe.yml file
image: mingc/android-build-box:latest
pipelines:
branches:
# Will be triggered only on merges/pushes into development.
development:
- step:
caches:
- maven
- gradle
- gradlewrapper
- androidavd
script:
- echo "Start testing"
- bash ./gradlew test -i
- echo "done testing!"
definitions:
caches:
gradlewrapper: ~/.gradle/wrapper
androidavd: $ANDROID_HOME/.android/avd
What should I do?
Any ideas, pointers, thoughts are welcome. :)