Skip to content

Add CI verification and dependency maintenance - #41

Draft
ryanduguid wants to merge 2 commits into
XeroAPI:mainfrom
ryanduguid:ci-verify
Draft

Add CI verification and dependency maintenance#41
ryanduguid wants to merge 2 commits into
XeroAPI:mainfrom
ryanduguid:ci-verify

Conversation

@ryanduguid

Copy link
Copy Markdown

What changed

  • Add a Verify workflow for pull requests and pushes to main that installs the locked dependency tree, builds the CLI, runs the test suite and audits production dependencies.
  • Add a separate scheduled and manually dispatched full dependency audit.
  • Add weekly Dependabot updates for npm and GitHub Actions, with npm updates grouped into one review unit.
  • Give workflows read-only repository permissions and pin every third-party action to a full commit SHA.

Why it changed

The repository needs a consistent baseline for testing contributions and surfacing dependency risk. The scheduled full-tree audit keeps newly published development-only advisories visible without making an unrelated pull request fail merely because an advisory was published after it was opened.

User or developer impact

There is no CLI runtime change. Contributors receive repeatable build, test and production-audit feedback, while maintainers receive scheduled full audits and bounded dependency-update pull requests.

Root cause

The current default branch has no repository-owned GitHub Actions workflow or Dependabot configuration, so build, test and dependency checks are not enforced consistently at the pull-request event source.

Validation

  • Fresh comparison with main at 96f68a839741412d48e6c317e92a81db81e9c0f8: this exact head is 0 commits behind and 2 ahead.
  • Parsed all three YAML files and checked the expected event sources, least-privilege permissions and full-SHA action pins.
  • Verified the pinned actions/checkout and actions/setup-node commits exist, are signature-verified and are the current v4 tag targets.
  • npm ci --ignore-scripts: passed.
  • npm run build: passed.
  • npm test: 130 tests passed across 8 files.
  • git diff --check: passed.

Dependency gate: the current base reports 15 total audit findings and 5 production findings, so the new production-audit step is expected to fail until #38 lands or this branch is updated onto its equivalent dependency repair. Exact-head validation for #38 passed clean install plus full and production audits with zero findings. This pull request should remain draft until that prerequisite and its hosted checks are resolved.

Verify runs build and tests on pull requests and pushes to main, with a
blocking npm audit scoped to runtime dependencies (--omit=dev), so PRs fail
only on advisories that affect the published CLI. A separate weekly
scheduled workflow audits the full tree including devDependencies, keeping
new dev-only advisories out of unrelated pull requests.
Weekly grouped npm updates and GitHub Actions updates complement the
scheduled audit by proposing dependency bumps proactively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant