diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4b9a8cd7..45879696 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,7 +57,9 @@ jobs: env: HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }} HONEYCOMB_DATASET: testacc - run: ./scripts/setup-testsuite-dataset + run: | + go install github.com/jstemmer/go-junit-report/v2@latest + ./scripts/setup-testsuite-dataset - name: Run client acceptance tests timeout-minutes: 10 @@ -66,7 +68,7 @@ jobs: HONEYCOMB_KEY_ID: ${{ secrets.HONEYCOMB_KEY_ID }} HONEYCOMB_KEY_SECRET: ${{ secrets.HONEYCOMB_KEY_SECRET }} HONEYCOMB_DATASET: testacc - run: go test -v -coverprofile=client-coverage.txt -covermode=atomic ./client/... + run: go test -v -coverprofile=client-coverage.txt -covermode=atomic ./client/... | go-junit-report -set-exit-code > client-report.xml - uses: hashicorp/setup-terraform@v3 with: @@ -82,7 +84,7 @@ jobs: HONEYCOMB_DATASET: testacc TF_ACC: 1 TF_ACC_TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }} - run: go test -v -coverprofile=tf-coverage.txt -covermode=atomic ./internal/... ./honeycombio/... + run: go test -v -coverprofile=tf-coverage.txt -covermode=atomic ./internal/... ./honeycombio/... | go-junit-report -set-exit-code > provider-report.xml - name: Cleanup Dangling Resources if: ${{ always() }} @@ -94,6 +96,12 @@ jobs: HONEYCOMB_DATASET: testacc run: make sweep + - name: Test Summary + if: always() + uses: test-summary/action@v2 + with: + paths: "*-report.xml" + - name: Generate Coverage Report uses: codecov/codecov-action@v4.5.0 with: @@ -123,7 +131,9 @@ jobs: HONEYCOMB_API_ENDPOINT: https://api.eu1.honeycomb.io HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY_EU }} HONEYCOMB_DATASET: testacc - run: ./scripts/setup-testsuite-dataset + run: | + go install github.com/jstemmer/go-junit-report/v2@latest + ./scripts/setup-testsuite-dataset - name: Run client acceptance tests timeout-minutes: 10 @@ -133,7 +143,7 @@ jobs: HONEYCOMB_KEY_ID: ${{ secrets.HONEYCOMB_KEY_ID_EU }} HONEYCOMB_KEY_SECRET: ${{ secrets.HONEYCOMB_KEY_SECRET_EU }} HONEYCOMB_DATASET: testacc - run: go test -v -coverprofile=client-coverage.txt -covermode=atomic ./client/... + run: go test -v -coverprofile=client-coverage.txt -covermode=atomic ./client/... | go-junit-report -set-exit-code > client-report.xml - uses: hashicorp/setup-terraform@v3 with: @@ -150,7 +160,7 @@ jobs: HONEYCOMB_DATASET: testacc TF_ACC: 1 TF_ACC_TERRAFORM_VERSION: ${{ env.TERRAFORM_VERSION }} - run: go test -v -coverprofile=tf-coverage.txt -covermode=atomic ./internal/... ./honeycombio/... + run: go test -v -coverprofile=tf-coverage.txt -covermode=atomic ./internal/... ./honeycombio/... | go-junit-report -set-exit-code > provider-report.xml - name: Cleanup Dangling Resources if: ${{ always() }} @@ -163,6 +173,12 @@ jobs: HONEYCOMB_DATASET: testacc run: make sweep + - name: Test Summary + if: always() + uses: test-summary/action@v2 + with: + paths: "*-report.xml" + - name: Generate Coverage Report uses: codecov/codecov-action@v4.5.0 with: