Skip to content

Add format input#85

Merged
brynary merged 4 commits into
mainfrom
bh-format-arg
May 3, 2025
Merged

Add format input#85
brynary merged 4 commits into
mainfrom
bh-format-arg

Conversation

@brynary

@brynary brynary commented May 3, 2025

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 3, 2025 17:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@qltysh

qltysh Bot commented May 3, 2025

Copy link
Copy Markdown
Contributor

Diff Coverage: The code coverage on the diff in this pull request is 85.7%.

Total Coverage: This PR will decrease coverage by 2.28%.

File Coverage Changes
Path File Coverage Δ Indirect
coverage/src/action.ts -5.7
coverage/src/settings.ts -0.2
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh

qltysh Bot commented May 3, 2025

Copy link
Copy Markdown
Contributor

Diff Coverage: The code coverage on the diff in this pull request is 100.0%.

Total Coverage: This PR will not change total coverage.

File Coverage Changes
Path File Coverage Δ Indirect
coverage/src/action.ts 0.1
coverage/src/settings.ts -0.2
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh

qltysh Bot commented May 3, 2025

Copy link
Copy Markdown
Contributor

1 new issue

Tool Category Rule Count
ripgrep Lint // NOTE: These formats need to be kept in sync with action.yml 1

Comment thread coverage/src/settings.ts
.string()
.transform((val) => (val === "" ? undefined : val));

// NOTE: These formats need to be kept in sync with action.yml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

// NOTE: These formats need to be kept in sync with action.yml [ripgrep:NOTE]

Comment thread coverage/tests/settings.test.ts Outdated
@brynary brynary merged commit 82077a6 into main May 3, 2025
@ethanbray

Copy link
Copy Markdown

@brynary Any chance you can tag a new version of this action please? I have a clover coverage file that is being misinterpreted as cobertura and the only way to resolve that is with the format option you introduced here.

Also, I have a situation which was previously supported with CodeClimate and wanted your thoughts on how to resolve it. Appreciate this may be more suitable for an issue, let me know if you would rather I report it there.

We have two separate test suites in one project that generate coverage files in clover and lcov format

      - name: Publish Qlty Code Coverage
        uses: qltysh/qlty-action/coverage@v1
        with:
          oidc: true
          skip-errors: 'false'
          files: ${{github.workspace}}/php-coverage/coverage.xml,${{github.workspace}}/cdk-coverage/lcov.info

With CodeClimate I could upload these in a single step by specifying the coverage format in the file path e.g. coverage.xml:clover and lcov.info:lcov respectively. Since the new format option applies to all files being uploaded, I've had to split the step into two steps like below

      - name: Publish PHP Code Coverage
        uses: qltysh/qlty-action/coverage@v1
        with:
          oidc: true
          skip-errors: 'false'
          format: clover
          total-parts-count: 2
          files: ${{github.workspace}}/php-coverage/coverage.xml

      - name: Publish CDK Code Coverage
        uses: qltysh/qlty-action/coverage@v1
        with:
          oidc: true
          skip-errors: 'false'
          format: lcov
          total-parts-count: 2
          files: ${{github.workspace}}/cdk-coverage/lcov.info

Is that the recommended approach? I haven't actually got it working yet since the format input is not available in v1.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants