feat: use GitHub Action for base os testing#62
Conversation
darklight3it
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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" | ||
|
|
There was a problem hiding this comment.
nit. Have you considered caching the RIE?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
nit. Have you considered caching docker layers. Maybe it could help a little bit.
What is the running time for these tests?
There was a problem hiding this comment.
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?
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)arch×distro_configx64(ubuntu-latest) andarm64(ubuntu-24.04-arm) runnersNew AL2023 Dockerfile (
Dockerfile.echo.al2023)public.ecr.aws/lambda/provided:al2023as the base imageNew local test script (
test/integration/run-local.sh)./test/integration/run-local.sh debian bookworm 3.4Removed
test/integration/codebuild/)test/integration/codebuild-local/).tar.gzbinaries (~10MB removed from the repo)Dockerfile.echo.amazonlinux(replaced byDockerfile.echo.al2023)Updated
actions/checkoutbumped tov6.0.2(pinned to SHA)Test matrix