Skip to content

AB-454: Setup coverage report and send to looker #847

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

jatin3893
Copy link
Collaborator

No description provided.

Test commit for re-triggering the pipelines
runs-on: ubuntu-latest
steps:
- name: Track unit-test coverage
uses: postman-eng/test-infra-scripts/.github/actions/coverage-pr-comment-action@main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change this to postmanlabs instead of postman-eng and every other place where this is being used

@jatin3893 jatin3893 requested a review from Copilot May 6, 2025 14:08
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR sets up automated coverage reporting by configuring GitHub Actions workflows to capture and upload test coverage reports. Key changes include:

  • Adding a new workflow (.github/workflows/test-infra-scripts-action.yml) for tracking unit and integration test coverage.
  • Updating the integration workflow (.github/workflows/integration.yml) to capture test output using tee and correctly propagate exit codes, as well as uploading coverage artifacts.
  • Introducing a condition to upload artifacts only when the Node version is 22.x.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/test-infra-scripts-action.yml New workflow for tracking and commenting on test coverage.
.github/workflows/integration.yml Updated test commands and artifact upload steps for coverage reports.
Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (4)

.github/workflows/integration.yml:23

  • [nitpick] Ensure that piping using 'tee' with 'exit ${PIPESTATUS[0]}' correctly propagates the exit status of 'npm run test-unit' on the ubuntu-latest runner. Consider adding an inline comment to clarify this behavior for future maintainers.
- run: npm run test-unit | tee coverage.txt && exit ${PIPESTATUS[0]}

.github/workflows/integration.yml:45

  • [nitpick] Ensure that piping using 'tee' with 'exit ${PIPESTATUS[0]}' correctly propagates the exit status of 'npm run test-regression' on the ubuntu-latest runner. Consider adding an inline comment to clarify this behavior for future maintainers.
- run: npm run test-regression | tee coverage.txt && exit ${PIPESTATUS[0]}

.github/workflows/integration.yml:25

  • Verify that limiting the upload of unit test coverage artifacts to Node version 22.x is intentional, as builds using other Node versions may not upload the expected artifacts.
if: matrix.node-version == '22.x'

.github/workflows/integration.yml:47

  • Verify that limiting the upload of integration test coverage artifacts to Node version 22.x is intentional, as builds using other Node versions may not upload the expected artifacts.
if: matrix.node-version == '22.x'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants