Skip to content

Commit 32ab948

Browse files
authored
Upload JUnit test reports to dashboard (#1150)
1 parent 25566a5 commit 32ab948

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/test-reporting.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ jobs:
4646
- name: Run receptor tests
4747
run: go test -v 2>&1 ./... | go-junit-report > report.xml
4848

49+
- name: Upload test results to dashboard
50+
if: >-
51+
!cancelled()
52+
&& github.event_name == 'push'
53+
&& github.repository == 'ansible/receptor'
54+
&& github.ref_name == github.event.repository.default_branch
55+
run: >-
56+
curl -v --user "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}:${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}"
57+
--form "xunit_xml=@report.xml"
58+
--form "component_name=receptor"
59+
--form "git_commit_sha=${{ github.sha }}"
60+
--form "git_repository_url=https://github.com/${{ github.repository }}"
61+
"${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/"
62+
4963
- name: get k8s logs
5064
if: ${{ failure() }}
5165
run: .github/workflows/artifact-k8s-logs.sh

0 commit comments

Comments
 (0)