From 8bd0532e784d4110e87b2f1661669ec295316c11 Mon Sep 17 00:00:00 2001 From: jessicamack Date: Thu, 26 Sep 2024 16:09:03 -0400 Subject: [PATCH] upload test reports --- .github/workflows/test-reporting.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/test-reporting.yml b/.github/workflows/test-reporting.yml index 5e2588126..847d8cdc0 100644 --- a/.github/workflows/test-reporting.yml +++ b/.github/workflows/test-reporting.yml @@ -46,6 +46,20 @@ jobs: - name: Run receptor tests run: go test -v 2>&1 ./... | go-junit-report > report.xml + - name: Upload test results to dashboard + if: >- + !cancelled() + && github.event_name == 'push' + && github.repository == 'ansible/receptor' + && github.ref_name == github.event.repository.default_branch + run: >- + curl -v --user "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}:${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}" + --form "xunit_xml=@report.xml" + --form "component_name=receptor" + --form "git_commit_sha=${{ github.sha }}" + --form "git_repository_url=https://github.com/${{ github.repository }}" + "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/" + - name: get k8s logs if: ${{ failure() }} run: .github/workflows/artifact-k8s-logs.sh