Skip to content

feat: use GitHub Action for base os testing#62

Merged
maxday merged 11 commits intoaws:mainfrom
maxday:maxday/use-github-action-for-base-os-testing
Apr 20, 2026
Merged

feat: use GitHub Action for base os testing#62
maxday merged 11 commits intoaws:mainfrom
maxday:maxday/use-github-action-for-base-os-testing

Conversation

@maxday
Copy link
Copy Markdown
Member

@maxday maxday commented Apr 17, 2026

Replace CodeBuild integration tests with GitHub Actions matrix workflow

Motivation

The existing integration test setup relied on AWS CodeBuild with 5 separate buildspec files, a local CodeBuild agent, and multiple shell scripts to orchestrate testing across OS distributions. This was overly complex and tightly coupled to CodeBuild infrastructure.

What changed

New GitHub Actions workflow (.github/workflows/integration-tests.yml)

  • Single workflow with a matrix strategy: arch × distro_config
  • Runs on both x64 (ubuntu-latest) and arm64 (ubuntu-24.04-arm) runners
  • Covers Alpine, Debian, Ubuntu, and AL2023 with Ruby 3.3 and 3.4
  • Downloads the RIE binary directly from GitHub releases (always latest)

New AL2023 Dockerfile (Dockerfile.echo.al2023)

  • Uses public.ecr.aws/lambda/provided:al2023 as the base image

New local test script (test/integration/run-local.sh)

  • Single script to run any distro/version combo locally
  • Usage: ./test/integration/run-local.sh debian bookworm 3.4

Removed

  • All 5 CodeBuild buildspec files (test/integration/codebuild/)
  • CodeBuild local agent scripts (test/integration/codebuild-local/)
  • Vendored RIE .tar.gz binaries (~10MB removed from the repo)
  • Old Dockerfile.echo.amazonlinux (replaced by Dockerfile.echo.al2023)

Updated

  • actions/checkout bumped to v6.0.2 (pinned to SHA)

Test matrix

Distro Version Ruby x64 arm64
Alpine 3.23 3.3, 3.4
Debian bookworm 3.3, 3.4
Ubuntu 24.04 3.3, 3.4
AL2023 al2023 3.3, 3.4

Copy link
Copy Markdown

@darklight3it darklight3it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

left only a couple of nits.

# Grab a fresh copy of the image and install ruby and build the runtime interface client gem
FROM amazonlinux:${DISTRO_VERSION} AS build-image
# Build stage: compile Ruby and build the RIC gem
FROM public.ecr.aws/lambda/provided:al2023 AS build-image
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it's probably the same but I think you can directly create the build from amazonlinux2023

curl -sSL "https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/${RIE_NAME}" -o ".scratch/${RIE_NAME}"
chmod +x ".scratch/${RIE_NAME}"
echo "RIE_NAME=${RIE_NAME}" >> "$GITHUB_ENV"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. Have you considered caching the RIE?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! but on a follow-up PR a want to add a trigger based on time: every workday. So it will run those workflow on a regular basis, if a new RIE is released, it will be picked up (and potentially fail the test, and our internal alarm will trigger). OK for you?

chmod +x ".scratch/${RIE_NAME}"
echo "RIE_NAME=${RIE_NAME}" >> "$GITHUB_ENV"

- name: Build Docker image
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. Have you considered caching docker layers. Maybe it could help a little bit.

What is the running time for these tests?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4min21: https://github.com/aws/aws-lambda-ruby-runtime-interface-client/actions/runs/24561650222
so let's keep it as is @darklight3it and we can revisit if it's too long?

@maxday maxday merged commit fabacba into aws:main Apr 20, 2026
19 checks passed
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.

4 participants