Skip to content

Uploading JUnit badge has incorrect conditional #2783

@jonahgraham

Description

@jonahgraham

The condition in junit.yml causes the JUnit badge to be updated on all PRs. This is because (IIUC) the junit.yml always runs on master because it runs with more privileges than maven.yml.

This conditional needs to be fixed (not sure to exactly what yet)

if: github.ref == 'refs/heads/master'

Take an example, https://github.com/eclipse-platform/eclipse.platform.swt/pull/2781/checks?check_run_id=55408269138 was created at 8:16am today my time, which corresponds to this run of the junit.yml https://github.com/eclipse-platform/eclipse.platform.swt/actions/runs/19365728713 which you can see on this line is uploading the badge:

Gist updated, written: badge.svg

You can also see the problem by looking at the revisions on the badge itself. It shows a couple of dozen revisions in the last 24 hours, but there have only been a handful of commits to master branch.

This means, with my fix in #2778, while the README.md publishes the expected badge, it continues to show incorrect information.

The common publishTestResults may have a similar issue, but AFAICT no projects are providing a gist-url so no badge is being made for other consumers.

cc @laeubi Do you have any insights on this? Does the above make sense?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions