Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/actions/prepare-e2e-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ inputs:
deno-version:
description: 'The Deno version to install, if the application needs Deno.'
default: 'v2.8.3'
build-lambda-layer:
description: 'Build the Lambda layer locally from the central SDK build instead of downloading its ZIP.'
default: 'false'
dependency-cache-key:
description: 'Workspace dependency cache key, required when building the Lambda layer locally.'
default: ''
artifacts-run-id:
description: 'The workflow run that uploaded the tarball artifacts. Defaults to the current run.'
default: ''
Expand Down Expand Up @@ -50,6 +56,18 @@ runs:
- name: Install pnpm
uses: ./.github/actions/install-pnpm

- name: Restore SDK build and dependencies for Lambda layer
if: inputs.build-lambda-layer == 'true'
uses: ./.github/actions/restore-cache
with:
dependency_cache_key: ${{ inputs.dependency-cache-key }}

- name: Build Lambda layer locally
if: inputs.build-lambda-layer == 'true'
# The central build already compiled the SDK; call the package script without rerunning Nx dependencies.
run: pnpm --filter @sentry/aws-serverless run build:layer
shell: bash

# upload-artifact strips the path through the first `*`, so the tarballs are stored as <pkg>/*.tgz and have to be
# downloaded into packages/.
- name: Restore tarball artifacts
Expand All @@ -69,7 +87,7 @@ runs:
github-token: ${{ inputs.github-token }}

- name: Restore build layer artifacts
if: inputs.test-application == 'aws-serverless-layer'
if: inputs.test-application == 'aws-serverless-layer' && inputs.build-lambda-layer != 'true'
uses: actions/download-artifact@v8
with:
name: build-layer-output
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,7 @@ jobs:
job_build_layer:
name: Build Lambda layer
needs: [job_get_metadata, job_build]
if:
needs.job_build.outputs.changed_aws_serverless == 'true' || contains(needs.job_build.outputs.e2e-matrix-aws-layer,
'aws-serverless-layer') || github.event_name != 'pull_request'
if: needs.job_get_metadata.outputs.is_release == 'true'
timeout-minutes: 10
runs-on: ubuntu-24.04
steps:
Expand Down Expand Up @@ -1084,6 +1082,8 @@ jobs:
uses: ./.github/actions/prepare-e2e-test
with:
test-application: ${{ matrix.test-application }}
build-lambda-layer: ${{ matrix.test-application == 'aws-serverless-layer' }}
dependency-cache-key: ${{ needs.job_build.outputs.dependency_cache_key }}
runtime: ${{ matrix.runtime }}
bun-version: ${{ matrix.bun-version }}
deno-version: ${{ matrix.deno-version }}
Expand Down Expand Up @@ -1146,10 +1146,10 @@ jobs:

job_e2e_aws_layer_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
needs: [job_get_metadata, job_build, job_build_layer]
needs: [job_get_metadata, job_build]
if: >-
always() && needs.job_build.result == 'success' && needs.job_build_layer.result == 'success' &&
needs.job_build.outputs.e2e-matrix-aws-layer != '{"include":[]}'
always() && needs.job_build.result == 'success' && needs.job_build.outputs.e2e-matrix-aws-layer !=
'{"include":[]}'
runs-on: ubuntu-24.04
timeout-minutes: 15
env: *e2e-env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"build-command": "NODE_VERSION=22 pnpm test:build",
"assert-command": "NODE_VERSION=22 pnpm test:assert",
"label": "aws-serverless-layer (Node 22)"
},
{
"build-command": "NODE_VERSION=24 pnpm test:build",
"assert-command": "NODE_VERSION=24 pnpm test:assert",
"label": "aws-serverless-layer (Node 24)"
}
]
}
Expand Down
Loading