Skip to content

CI: compile/synth the CDK sample (not just parse it) #60

Description

@alphacrack

Summary

The CDK sample's package.json pins aws-cdk-lib and gets periodic Dependabot bumps, but there's no CI step that actually compiles the CDK sample (cdk synth / tsc). Add a lightweight check so a broken sample is caught.

Why

samples/cdk/ is used by the smoke test via --scan-only (which just parses index.ts as text), so a sample that no longer compiles would still pass smoke. The iac-scanner-cdk-nag companion actually runs cdk synth, so a broken sample breaks that path silently.

What to do

  • Add a CI job (or extend an existing one) that runs npm ci && npx cdk synth (or tsc --noEmit) in samples/cdk/.
  • Keep it non-blocking initially if flakiness is a concern, then promote to required.

Acceptance criteria

  • CI compiles/synths the CDK sample.
  • A deliberately-broken index.ts would fail the job (verify locally).

Good first issue notes

Touches CI + a bit of Node tooling. Moderate. area:ci, iac:cdk. Good if you're comfortable with npm/CDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ci.github/workflows, pre-commit, release automationhelp wantedMaintainers welcome a PR hereiac:cdkAWS CDK (index.ts / index.js) scanning / fix outputtype:choreHousekeeping, tooling, CI, or repo config

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions