I am trying to configure a CI pipeline for my Android app.
I am using the following config to run my unit tests:
version: 2
jobs:
test:
working_directory: ~/code
docker:
- image: circleci/android:api-28
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
# - run:
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
# 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" }}
- run:
name: Run Tests
command: ./gradlew test
workflows:
version: 2
test_wf:
jobs:
- test:
filters:
branches:
only: circleci-integration
However the build in CircleCI doesnt appear. Already checked this but no build with yellow tag is displayed.
And in bitbucket I can see that the webhook was executed with code 200 (Success).
What is interesting, is that when I add the branches section in the job like this:
version: 2
jobs:
test:
branches:
only:
- circleci-integration
working_directory: ~/code
...
The build is triggered but it fails with the following error:
Job \"test\" has filters configured in the job definition. These filters are incompatible with workflows.
Does anyone why this is happening? Why with my config, CircleCI doesn’t start the build?