• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Khan / perseus / 5932920478 / 1 – cypress
69%
main: 69%

Build:
DEFAULT BRANCH: main
Ran 22 Aug 2023 12:40AM UTC
Files 368
Run time 11s
Badge
Embed β–Ύ
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Aug 2023 12:34AM UTC coverage: 26.144%. Remained the same
cypress – 5932920478.1

push

github

web-flow
[πŸ”₯AUDITπŸ”₯] Fix npm snapshots so they really don't run for Changeset PRs (#686)

πŸ– _This is an audit!_ πŸ–

## Summary:

The Perseus repository is set up to publish an npm snapshot for any non-draft PR. When creating the snapshot, we also check if there are any changesets before attempting to publish a snapshot, because the `changeset` tool will fail if there aren't any. 

When the `Version Packages` PR workflows run, all changeset files are being deleted and migrated to `CHANGELOG` files in each package. As a result, there are no changesets and so the `yarn changeset` command we use to publish the snapshot fails.

So this PR fixes our check and ensures we don't run the npm snapshot workflow for the special `Version Packages` PRs.

### Details of the fix

I originally thought I'd fixed this issue by comparing the `github.ref` value. It appears that in PRs, that value is not `refs/heads/chagneset-release/main` but rather `refs/remotes/pull/685/merge` (a PR branch). Reading Github's docs more closely, I found that `github.ref_name` is what I want, it is the friendly name of the PR branch as it appears in the Github UI.

Issue: "none"

## Test plan:

We'll have to monitor future "Version Packages" PRs and make sure the npm snapshot workflow doesn't run.

Author: jeremywiebe

Auditors: #perseus

Required Reviewers:

Approved By:

Checks: βœ… finish_coverage, βœ… Publish npm snapshot (ubuntu-latest, 16.x), βœ… Extract i18n strings (ubuntu-latest, 16.x), βœ… Jest Coverage (ubuntu-latest, 16.x), βœ… Check builds for changes in size (ubuntu-latest, 16.x), βœ… Lint, Typecheck, Format, and Test (ubuntu-latest, 16.x), βœ… Check for .changeset file (ubuntu-latest, 16.x), βœ… Cypress Coverage (ubuntu-latest, 16.x), βœ… gerald

Pull Request URL: https://github.com/Khan/perseus/pull/686

1880 of 9625 branches covered (19.53%)

Branch coverage included in aggregate %.

5528 of 18710 relevant lines covered (29.55%)

930.7 hits per line

Source Files on job cypress - 5932920478.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 0
  • Coverage Changed 0
Coverage βˆ† File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 5932920478
  • 98a3b560 on github
  • Prev Job for on main (#5932616886.1)
  • Next Job for on main (#5933103501.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc