diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffe76debcd..b2e4313f51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,25 +112,27 @@ jobs: path: reports/coverage.xml retention-days: 5 - - name: Upload awx jUnit test reports + - name: >- + Upload ${{ + matrix.tests.coverage-upload-name || 'awx' + }} jUnit test reports to the unified dashboard if: >- !cancelled() && steps.make-run.outputs.test-result-files != '' && github.event_name == 'push' && env.UPSTREAM_REPOSITORY_ID == github.repository_id && github.ref_name == github.event.repository.default_branch - run: | - for junit_file in $(echo '${{ steps.make-run.outputs.test-result-files }}' | sed 's/,/ /') - do - curl \ - -v \ - --user "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}:${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}" \ - --form "xunit_xml=@${junit_file}" \ - --form "component_name=${{ matrix.tests.coverage-upload-name || 'awx' }}" \ - --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/" - done + uses: ansible/gh-action-record-test-results@cd5956ead39ec66351d0779470c8cff9638dd2b8 + with: + aggregation-server-url: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }} + http-auth-password: >- + ${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }} + http-auth-username: >- + ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }} + project-component-name: >- + ${{ matrix.tests.coverage-upload-name || 'awx' }} + test-result-files: >- + ${{ steps.make-run.outputs.test-result-files }} dev-env: runs-on: ubuntu-latest @@ -294,18 +296,16 @@ jobs: && github.event_name == 'push' && env.UPSTREAM_REPOSITORY_ID == github.repository_id && github.ref_name == github.event.repository.default_branch - run: | - for junit_file in $(echo '${{ steps.make-run.outputs.test-result-files }}' | sed 's/,/ /') - do - curl \ - -v \ - --user "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}:${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}" \ - --form "xunit_xml=@${junit_file}" \ - --form "component_name=awx" \ - --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/" - done + uses: ansible/gh-action-record-test-results@cd5956ead39ec66351d0779470c8cff9638dd2b8 + with: + aggregation-server-url: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }} + http-auth-password: >- + ${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }} + http-auth-username: >- + ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }} + project-component-name: awx + test-result-files: >- + ${{ steps.make-run.outputs.test-result-files }} collection-integration: name: awx_collection integration