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

Fixing issues with code coverage report generation and upload to Code Climate #489

Open
wants to merge 17 commits into
base: dmou/test-consolidate-dockerfiles
Choose a base branch
from

Conversation

caiosba
Copy link
Contributor

@caiosba caiosba commented Nov 6, 2024

Description

Fixes the steps that generate and upload the code coverage report to Code Climate.

The main issue was that previously, we ran the tests, prepared the coverage report, and uploaded it all within the Docker container. Now, however, the tests run inside the Docker container, while the coverage report is prepared outside of it, leading to a mismatch in file paths. The solution I implemented was to use sed to replace the paths, changing /app/pender to /home/runner/work/pender. I also needed to copy codeclimate.json to the coverage directory and set the $CC_TEST_REPORTER_ID environment variable.

Reference: CV2-5020.

How has this been tested?

Code Coverage report was generated and uploaded to Code Climate as expected:

Captura de tela de 2024-11-06 22-06-44

Captura de tela de 2024-11-06 22-06-55

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

@caiosba caiosba changed the base branch from dmou/test-consolidate-dockerfiles to develop November 6, 2024 16:13
@caiosba caiosba changed the base branch from develop to dmou/test-consolidate-dockerfiles November 6, 2024 16:14
@caiosba caiosba changed the title [WIP] Trying to fix Code Coverage upload issue Fixing issues with code coverage report generation and upload to Code Climate Nov 7, 2024
@caiosba caiosba marked this pull request as ready for review November 7, 2024 01:13
@caiosba caiosba requested review from dmou and removed request for melsawy, jayjay-w and vasconsaurus November 7, 2024 01:13
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 this pull request may close these issues.

1 participant