Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Coverage not available #773

Closed
kwin opened this issue Jun 30, 2022 · 1 comment · Fixed by #774
Closed

Code Coverage not available #773

kwin opened this issue Jun 30, 2022 · 1 comment · Fixed by #774

Comments

@kwin
Copy link
Collaborator

kwin commented Jun 30, 2022

Describe the bug
Each GitHub action running codecov/codecov-action@v3 emits the following error

Run codecov/codecov-action@v3
  with:
    file: ./target/site/jacoco/jacoco.xml
    flags: unittests
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.0.33[2](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:2)-9/x64
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (4[3](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:3)2553f0371[4](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:4)a83ab[5](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:5)cac78be2e7fe[6](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:6)a6050[7](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:8)67f7[8](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:9)f77e[9](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:10)c7a84bdb1c34a0bd3  codecov)
==> Running version latest
==> Running version v0.2.4
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.0 -f ./target/site/jacoco/jacoco.xml -F unittests
[2022-06-29T17:37:26.983Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.2.4
[2022-06-29T[17](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:18):37:26.990Z] ['info'] => Project root located at: /home/runner/work/asset-share-commons/asset-share-commons
[[20](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:21)[22](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:23)-06-29T17:37:26.991Z] ['info'] -> No token specified or token is empty
[2022-06-29T17:37:27.000Z] ['info'] Searching for coverage files...
[2022-06-29T17:37:27.170Z] ['error'] None of the following appear to exist as files: ./target/site/jacoco/jacoco.xml
[2022-06-29T17:37:[27](https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:28).170Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!

(from https://github.com/adobe/asset-share-commons/runs/7117337296?check_suite_focus=true#step:7:1)

The last code coverage available at https://app.codecov.io/gh/Adobe-Marketing-Cloud/asset-share-commons is from over a year ago (CI with Travis).

@kwin
Copy link
Collaborator Author

kwin commented Jun 30, 2022

The reason for that is that jacoco is not executed during the Maven build. There should be a dedicated build profile collecting the coverage data like https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/7a946166da2baf9962500b9b1e6f087b0664a68e/pom.xml#L682-L736 or https://github.com/apache/sling-parent/blob/aa90f32f4d4f2af9cf7ef80f6254840c3c525a97/sling-parent/pom.xml#L360-L467.

kwin added a commit that referenced this issue Jun 30, 2022
kwin added a commit that referenced this issue Jun 30, 2022
kwin added a commit that referenced this issue Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant