Unit test reports not found
I was running unit test and generating report on gitlab's CI/CD (refer link) but while uploading the artifacts got an warning "WARNING: build/test-results/**/*.xml: no matching files
" and no reports were found inn pipeline.
Following is the yml file script:
image: jangrewe/gitlab-ci-android
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
stages:
- test
unitTest:
stage: test
script:
- ./gradlew test
artifacts:
when: always
reports:
junit: build/test-results/test/**/TEST-*.xml
only:
- merge_requests
Output:
Running with gitlab-runner 12.0.1 (0e5417a3)
on DO jbstsfk_
Fetching changes with git depth set to 50...
00:04
Checking out 8bc2d8cf as refs/merge-requests/212/head...
Removing .gradle/
Removing app/build/
Removing build/
Removing core/build/
Removing zwl-style/build/
Skipping Git submodules setup
Checking cache for 18562575...
00:22
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
$ export GRADLE_USER_HOME=$(pwd)/.gradle
06:36
$ chmod +x ./gradlew
$ ./gradlew test
.
.
.
BUILD SUCCESSFUL in 6m 33s
179 actionable tasks: 179 executed
Creating cache 18562575...
00:58
.gradle/: found 34161 matching files
No URL provided, cache will be not uploaded to shared cache server. Cache will be stored only locally.
Created cache
Uploading artifacts...
00:01
WARNING: build/test-results/test/**/TEST-*.xml: no matching files
ERROR: No files to upload
Job succeeded
I also tried to look up in build directory and found that it only contains a "kotlin" sub directory and it does not contain test results. Any idea where else can I find the test-results? TIA
Edited by Rohan Dudeja