File tree 4 files changed +34
-3
lines changed
4 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 21
21
strategy :
22
22
matrix :
23
23
# 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"]
26
26
steps :
27
27
- name : " Checkout"
28
28
uses : actions/checkout@v3
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ unit-test:
35
35
poetry run pytest tests/unit
36
36
37
37
e2e-test :
38
- poetry run pytest -rP -n auto --dist loadfile -o log_cli=true tests/e2e
38
+ python parallel_run_e2e.py
39
39
40
40
coverage-html :
41
41
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