Skip to content

Make fixture generation work in shallow CI/local clones #49

@ANonABento

Description

@ANonABento

Problem

The test/build preprocessing step runs ./scripts/generate-fixtures.sh, which expects origin/data to exist. In a fresh shallow clone made with gh repo clone -- --depth 1, running the test command fails during preprocessing:

> npm run generate-fixtures
Preparing workspace...
Generating fixtures...
fatal: invalid reference: origin/data

This makes local smoke testing and some CI clone configurations fragile, because the default checkout may not have the extra remote branch/ref available.

Suggested fix

  • Update generate-fixtures.sh to fetch origin/data explicitly when missing, or document the required fetch step.
  • Consider making the branch/ref configurable via an environment variable.
  • Add a clearer error message when fixture generation cannot find the data ref.
  • If tests require remote fixtures, make the workflow fetch depth/ref explicit in .github/workflows/build.yml.

Evidence

  • npm test -- --runInBand fails in a shallow clone before type-check/lint because origin/data is missing.

Relevant files

  • scripts/generate-fixtures.sh
  • package.json
  • .github/workflows/build.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions