Skip to content

Add CI: build layer and smoke-test it in the Lambda runtime image - #50

Merged
zoellner merged 9 commits into
mainfrom
ci/layer-smoke-test
Oct 9, 2026
Merged

zoellner merged 9 commits into
mainfrom
ci/layer-smoke-test

Conversation

@zoellner

@zoellner zoellner commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Adds a GitHub Actions workflow (free on public repos with standard runners) and removes eslint.

Workflow Test layer

  • syntax-check: npm test (node --check on the repo's JS files; nothing to install)
  • build-and-test:
    • builds the layer with sam build --use-container (same public.ecr.aws/sam/build-nodejs24.x image as the documented path), with higher build parallelism for the 4 vCPU / 16 GB runner
    • uploads the built layer as an artifact (7 day retention)
    • mounts the layer at /opt in public.ecr.aws/lambda/nodejs:24 (no toolchain/-devel packages, so missing shared libs fail) and runs test/layer.test.js:
      • dynamic loader resolves every shared library of the compiled sharp addon
      • sharp and libvips versions match layer/Makefile; no prebuilt @img/sharp-* bundled
      • HEIF/WebP/JPEG/PNG input+output support reported
      • decodes examples/src/test-input.heic (3024x4032, hevc)
      • resizes to 200px WebP
      • encodes + decodes HEIF with HEVC (x265) and AV1 (libaom); the HEVC case passes tune: 'ssim' because sharp 0.35's default tune: 'auto' is rejected by libheif's x265 plugin (heif: Invalid parameter value (5.2006))
    • invokes the example function through the Lambda Runtime Interface Emulator and checks for a 200 response with a WebP body

Runs on PRs, pushes to main, and manual dispatch; superseded PR runs are cancelled.

Remove eslint

eslint was the only dependency of the root package and the source of all 10 open Dependabot alerts (transitive deps in package-lock.json). Removed the devDependency, eslint.config.js and the lint scripts; npm test now runs node --check, also used by buildspec.yml in place of npm run lint. The lockfile has no dependencies left and npm audit is clean. Supersedes #45–#49.

eslint was the only dependency of the root package and the source of all
open Dependabot alerts (transitive deps in package-lock.json). node --check
gives the same syntax check without installing anything.
@zoellner
zoellner merged commit ce9d5ce into main Oct 9, 2026
3 checks passed
@zoellner
zoellner deleted the ci/layer-smoke-test branch October 9, 2026 08:06
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