Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Draft
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
41 changes: 41 additions & 0 deletions 41 .github/workflows/aws-lambda-flake-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: AWS Lambda Flake Check

on:
pull_request:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
aws-lambda-flake:
name: aws_lambda py${{ matrix.python-version }} #${{ matrix.attempt }}
timeout-minutes: 30
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.11", "3.13"]
attempt: [1, 2, 3, 4, 5]
services:
docker:
image: docker:dind
options: --privileged
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Setup Test Env
run: uv sync
- name: Test aws_lambda (attempt ${{ matrix.attempt }})
run: |
set -x
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda"
10 changes: 5 additions & 5 deletions 10 tests/integrations/aws_lambda/test_aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

DOCKER_NETWORK_NAME = "lambda-test-network"
SAM_TEMPLATE_FILE = "sam.template.yaml"
SAM_SHUTDOWN_TIMEOUT = 60


@pytest.fixture(scope="session", autouse=True)
Expand Down Expand Up @@ -78,13 +79,12 @@ def before_test():

finally:
print("[test_environment fixture] Tearing down AWS Lambda test infrastructure")

process.terminate()
process.wait(timeout=10) # Give it time to shut down gracefully

# Force kill if still running
if process.poll() is None:
try:
process.wait(timeout=SAM_SHUTDOWN_TIMEOUT)
except subprocess.TimeoutExpired:
process.kill()
process.wait()


@pytest.fixture(autouse=True)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.