-
Notifications
You must be signed in to change notification settings - Fork 83
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
thom-at-redhat
merged 15 commits into
ansible:devel
from
jessicamack:create-test-report
Sep 26, 2024
Merged
Changes from 2 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
340dc74
generate junit test report
jessicamack 954c666
fix install command
jessicamack 5498cd5
change test command
jessicamack 0ec62b4
rename step
jessicamack 9fd7a3d
try installing package a different way
jessicamack 7345437
remove path
jessicamack a901d1f
missed removal
jessicamack 07381f2
run without report conversion
jessicamack 735270e
remove duplicate
jessicamack b58f436
don't set exit code
jessicamack 0f53725
try tmate
jessicamack 3fc83de
move tmate
jessicamack 37bf51a
Update test-reporting.yml
jessicamack 334f53e
remove extra line
jessicamack a611ce8
remove makefile changes
jessicamack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
name: Generate junit test report | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: # yamllint disable-line rule:empty-values | ||
push: | ||
branches: [devel] | ||
|
||
env: | ||
DESIRED_GO_VERSION: '1.20' | ||
|
||
jobs: | ||
go_test_coverage: | ||
name: go test coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.DESIRED_GO_VERSION }} | ||
|
||
- name: build and install receptor | ||
run: | | ||
make build-all | ||
sudo cp ./receptor /usr/local/bin/receptor | ||
|
||
- name: Download kind binary | ||
run: curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 && chmod +x ./kind | ||
|
||
- name: Create k8s cluster | ||
run: ./kind create cluster | ||
|
||
- name: Interact with the cluster | ||
run: kubectl get nodes | ||
|
||
- name: Run receptor tests with coverage | ||
run: make coverage -v 2>&1 ./... | go-junit-report -set-exit-code > report.xml | ||
|
||
- name: get k8s logs | ||
if: ${{ failure() }} | ||
run: .github/workflows/artifact-k8s-logs.sh | ||
|
||
- name: remove sockets before archiving logs | ||
if: ${{ failure() }} | ||
run: find /tmp/receptor-testing -name controlsock -delete | ||
|
||
- name: Artifact receptor data | ||
uses: actions/upload-artifact@v4.4.0 | ||
if: ${{ failure() }} | ||
with: | ||
name: test-logs | ||
path: /tmp/receptor-testing | ||
|
||
- name: Archive receptor binary | ||
uses: actions/upload-artifact@v4.4.0 | ||
with: | ||
name: receptor | ||
path: /usr/local/bin/receptor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like this?: