runAffectedUnitTests -Paffected_module_detector.enable fails on CI only
See original GitHub issueHey, this was mentioned before but in my case it’s only failing on CI When I run ./gradlew runAffectedUnitTests -Paffected_module_detector.enable on Bitrise it fails in my project with error:
* What went wrong:
Could not evaluate onlyIf predicate for task ':module:testDebugUnitTest'.
> Nonzero exit value running git command.
the task is working fine locally My git project is setup on CI and i do git clone before invoking this command
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Troubleshooting Continuous Integration, or How to Debug ...
If you're using a Continuous Integration server, sooner or later a build will fail on the CI, but pass on your development machine....
Read more >Unit test reports - GitLab Docs
It is very common that a CI/CD pipeline contains a test job that verifies your code. If the tests fail, the pipeline fails...
Read more >Grails Spock unit tests pass locally but fail in CI environment
I have a set of Spock based unit tests that are passing locally but failing with the two following exceptions being logged on...
Read more >Fixing Tests in CI/CD: Why are Your Tests Failing?
There are multiple reasons to take failing tests seriously. First, failed tests can block the delivery of new releases, because the CI/CD ...
Read more >Foresight Blog | How to Debug Tests in the CI Pipeline
The main reasons are listed below. Test Failures*:. Failures of unit tests, integration tests, functional tests, or performance tests can cause build failures....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you post the out of the log file produced by the plugin?
I struggled with this issue over the past couple of days. In my case, the specifiedBranch was absent from the working tree. (I use Github Actions and it clones the repo in some sort of minimalist fashion).
My solution was to run
git fetch origin develop:develop
right beforerunAffectedUnitTests
Note: in this case
develop
is the specifiedBranch. Replace with whatever branch you specified.Hello, I think @shobande-femi pointed out what is probably going wrong. You need to make sure that your CI has access to the git tree that it needs. You can find a log with a more detailed error in your
logFolder/logFilename
As this hasn’t been updated in a few months I am going to close, please reopen or file a new ticket if you are still having issues