Skip to content

Add the package CI job #162

Description

@lmcorbalan

User story / Problem statement

CI has two jobs, registry and daml. Neither runs a root npm install, so
nothing on the pull-request path compiles the service against the dependency set
a consumer gets, and nothing checks that the published package installs at all.
A change that empties the tarball, or leaves a runtime import declared only in
registry/package.json, is green on both existing checks and breaks only in a
downstream repository.

Expected outcome

A third status check, package, that installs from the root, checks the two
manifests agree, and runs the install smoke test.

Acceptance criteria

  • A job named package in .github/workflows/ci.yml, alongside registry
    and daml
  • Its scope gate is per-step, matching the two existing jobs, so a scoped-out
    pull request reports a green check carrying the scope log rather than
    skipped
  • The gate matches package.json, package-lock.json, registry/, both new
    scripts, .gitignore, and ci.yml
  • Steps, in order: checkout with full history, scope, setup-node keyed on the
    root lockfile, npm ci, npm run check:deps, npm run smoke:registry
  • The gate regex is verified against a fixed list of paths that must match and
    paths that must not

Technical notes

  • .gitignore belongs in the gate. The rule that keeps registry/dist out
    of git is the same rule that decides whether it reaches the tarball, so an edit
    there can empty the package while touching nothing else the gate would catch.
  • The root npm ci runs prepare, so this job compiles registry/src against
    the root dependency set, which is the set a consumer gets. That is a
    different compile from the registry job's, and it is the one that would catch
    a type package arriving only through registry/node_modules.
  • A job's name is the status check context a ruleset would match on. Neither
    existing check is required yet, so adding this one changes no merge
    requirement; naming it consistently now is what makes it requirable later.
  • Copy the existing scope step verbatim, including its three-attempt fetch retry.
    A blip on that fetch would otherwise red a check having verified nothing.
  • This job's own pull request touches ci.yml, which is in all three gates, so
    all three jobs run on it. The Daml job's gate also matches package.json and
    package-lock.json, so the two manifest issues in this epic each trigger a
    full Daml build; that is expected, not a misconfiguration.

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

    enhancementNew feature or requestpriority: highMust be addressed in current sprint

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions