Skip to content

Add a CI workflow that runs the test suite #72

Description

@annakrystalli

This repo has no continuous integration of any kind. There is no .github/ directory, and no Travis, CircleCI, GitLab, Appveyor or Azure config either, so npm test has never run anywhere except on a contributor's machine. Pull requests report no checks.

The cost of that is concrete: the closestYear() failure in #71 is on master today, and it only reproduces in some timezones. A contributor in the US sees a green suite, one in Europe or Asia sees a red one, and nothing in the repo arbitrates.

Proposal

A GitHub Actions workflow running npm ci && npm test on push and pull request.

Two things worth building in from the start:

  • A timezone matrix. Running the suite under at least one timezone ahead of UTC and one behind would have caught closestYear() returns a date one day early in timezones ahead of UTC #71 on the commit that introduced it. TZ is a plain environment variable, so this costs one matrix axis.
  • Don't pin TZ=UTC to get green. The suite passes under UTC, so pinning it would make CI pass while leaving the bug in place for every user east of Greenwich.

That means #71 wants fixing first, or the workflow's first run will be red for a reason unrelated to whatever PR adds it.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions