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

Khan / perseus / 5932920478
69%

Build:
DEFAULT BRANCH: main
Ran 22 Aug 2023 12:34AM UTC
Jobs 2
Files 530
Run time 19s
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: 69.321%. Remained the same
5932920478

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

7625 of 16592 branches covered (45.96%)

Branch coverage included in aggregate %.

71446 of 97473 relevant lines covered (73.3%)

709.84 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 cypress 5932920478.1 22 Aug 2023 12:34AM UTC 368
26.14
GitHub Action Run
2 jest 5932920478.2 22 Aug 2023 12:40AM UTC 525
63.29
GitHub Action Run
Source Files on build 5932920478
  • Tree
  • List 530
  • Changed 5
  • Source Changed 0
  • Coverage Changed 0
Coverage βˆ† File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 98a3b560 on github
  • Prev Build on main (#5932616886)
  • Next Build on main (#5933103501)
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