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

Convert test coverage report to junit format #1148

Merged
merged 15 commits into from
Sep 26, 2024

Conversation

jessicamack
Copy link
Member

To track the test results from receptor we need them to be in a JUnit compatible format. This PR adds https://github.com/jstemmer/go-junit-report to convert the test output into an xml report.

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.60%. Comparing base (0d71e55) to head (a611ce8).
Report is 1 commits behind head on devel.

@@            Coverage Diff             @@
##            devel    #1148      +/-   ##
==========================================
+ Coverage   42.96%   43.60%   +0.63%     
==========================================
  Files          33       36       +3     
  Lines        6612     7192     +580     
==========================================
+ Hits         2841     3136     +295     
- Misses       3534     3822     +288     
+ Partials      237      234       -3     

see 5 files with indirect coverage changes

Components Coverage Δ
Go 43.10% <ø> (+0.13%) ⬆️
Receptorctl 49.31% <ø> (∅)

- name: Interact with the cluster
run: kubectl get nodes

- name: Run receptor tests with coverage
Copy link
Contributor

@AaronH88 AaronH88 Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this?:

  - name: Install go junit reporting
    run: make go-junit-report

  - name: Run receptor tests
    run: PATH="${PWD}:${PATH}" go test -v 2>&1 ./... | go-junit-report -set-exit-code > report.xml

Copy link

sonarcloud bot commented Sep 26, 2024

@thom-at-redhat thom-at-redhat merged commit 25566a5 into ansible:devel Sep 26, 2024
24 checks passed
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.

3 participants