File tree Expand file tree Collapse file tree 4 files changed +34
-3
lines changed Expand file tree Collapse file tree 4 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 2121 strategy :
2222 matrix :
2323 # Maintenance: disabled until we discover concurrency lock issue with multiple versions and tmp
24- # version: ["3.7", "3.8", "3.9"]
25- version : ["3.7"]
24+ version : ["3.7", "3.8", "3.9"]
25+ # version: ["3.7"]
2626 steps :
2727 - name : " Checkout"
2828 uses : actions/checkout@v3
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ unit-test:
3535 poetry run pytest tests/unit
3636
3737e2e-test :
38- poetry run pytest -rP -n auto --dist loadfile -o log_cli=true tests/e2e
38+ python parallel_run_e2e.py
3939
4040coverage-html :
4141 poetry run pytest -m " not perf" --ignore tests/e2e --cov=aws_lambda_powertools --cov-report=html
Original file line number Diff line number Diff line change 1+ """ Calculate how many parallel workers are needed to complete E2E infrastructure jobs across available CPU Cores """
2+ import subprocess
3+ from pathlib import Path
4+
5+
6+ def main ():
7+ features = Path ("tests/e2e" ).rglob ("infrastructure.py" )
8+ workers = len (list (features )) - 1
9+
10+ command = f"poetry run pytest -n { workers } --dist loadfile -o log_cli=true tests/e2e"
11+ print (f"Running E2E tests with: { command } " )
12+ subprocess .run (command .split (), shell = False )
13+
14+
15+ if __name__ == "__main__" :
16+ main ()
Original file line number Diff line number Diff line change 1+ [tox]
2+ envlist = py37,py38,py39
3+
4+ [testenv]
5+ deps =
6+ filelock
7+ pytest-xdist
8+ pydantic
9+ email-validator
10+
11+ commands = python parallel_run_e2e.py
12+
13+ ; If you ever encounter another parallel lock across interpreters
14+ ; pip install tox tox-poetry
15+ ; tox -p --parallel-live
You can’t perform that action at this time.
0 commit comments