File tree Expand file tree Collapse file tree 9 files changed +159
-137
lines changed Expand file tree Collapse file tree 9 files changed +159
-137
lines changed Original file line number Diff line number Diff line change 43
43
run : |
44
44
make complex
45
45
- run : echo "🖥️ The workflow is now ready to test your code on the runner."
46
- - name : Unit tests
46
+ - name : Unit and Integration tests
47
47
run : |
48
- make unit
48
+ make pipeline-tests
49
49
- name : Codecov
50
50
uses : codecov/codecov-action@v3.1.0
51
51
with :
Original file line number Diff line number Diff line change 1
- .PHONY : dev lint complex coverage pre-commit yapf sort deploy destroy deps unit e2e docs
1
+ .PHONY : dev lint complex coverage pre-commit yapf sort deploy destroy deps unit integration e2e pipeline-tests docs
2
2
3
3
4
4
@@ -29,14 +29,20 @@ deps:
29
29
unit :
30
30
pytest tests/unit --cov-config=.coveragerc --cov=service --cov-report xml
31
31
32
+ integration :
33
+ pytest tests/integration --cov-config=.coveragerc --cov=service --cov-report xml
34
+
32
35
e2e :
33
36
pytest tests/e2e --cov-config=.coveragerc --cov=service --cov-report xml
34
37
35
- pr : deps yapf sort pre-commit complex lint unit e2e
38
+ pr : deps yapf sort pre-commit complex lint unit integration e2e
36
39
37
40
yapf :
38
41
yapf -i -vv --style=./.style --exclude=.venv --exclude=.build --exclude=cdk.out --exclude=.git -r .
39
42
43
+ pipeline-tests :
44
+ pytest tests/unit tests/integration --cov-config=.coveragerc --cov=service --cov-report xml
45
+
40
46
deploy :
41
47
make deps
42
48
mkdir -p .build/lambdas ; cp -r service .build/lambdas
Original file line number Diff line number Diff line change 25
25
install_requires = [
26
26
'aws-cdk-lib>=2.0.0' ,
27
27
'constructs>=10.0.0' ,
28
- 'aws-cdk.aws-lambda-python-alpha==2.24.1 -alpha.0' ,
28
+ 'aws-cdk.aws-lambda-python-alpha==2.27.0 -alpha.0' ,
29
29
],
30
30
)
Original file line number Diff line number Diff line change 1
1
-i https://pypi.org/simple
2
2
-e ./cdk
3
3
attrs==21.4.0
4
- aws-cdk-lib==2.25 .0
5
- aws-cdk.aws-lambda-python-alpha==2.24.1a0
6
- boto3==1.23.9
7
- botocore==1.26.9
4
+ aws-cdk-lib==2.27 .0
5
+ aws-cdk.aws-lambda-python-alpha==2.27.0a0
6
+ boto3==1.24.7
7
+ botocore==1.27.7
8
8
cattrs==1.10.0
9
9
certifi==2022.5.18.1
10
10
cfgv==3.3.1
11
- charset-normalizer==2.0.12 ; python_version >= '3'
11
+ charset-normalizer==2.0.12
12
12
click==8.1.3
13
13
colorama==0.4.4 ; python_version > '3.4'
14
- constructs==10.1.19
15
- coverage[toml]==6.4
14
+ constructs==10.1.36
15
+ coverage[toml]==6.4.1
16
16
distlib==0.3.4
17
- filelock==3.7.0
17
+ filelock==3.7.1
18
18
flake8==4.0.1
19
19
future==0.18.2
20
20
ghp-import==2.1.0
@@ -27,15 +27,15 @@ iniconfig==1.1.1
27
27
isort==5.10.1
28
28
jinja2==3.1.2
29
29
jmespath==1.0.0
30
- jsii==1.59.0
30
+ jsii==1.60.1
31
31
mando==0.6.4
32
32
markdown==3.3.7
33
33
markupsafe==2.1.1
34
34
mccabe==0.6.1
35
35
mergedeep==1.3.4
36
36
mkdocs-git-revision-date-plugin==0.3.2
37
37
mkdocs-material-extensions==1.0.3
38
- mkdocs-material==8.2.15
38
+ mkdocs-material==8.3.4
39
39
mkdocs==1.3.0
40
40
nodeenv==1.6.0
41
41
packaging==21.3
@@ -47,7 +47,7 @@ py==1.11.0
47
47
pycodestyle==2.8.0
48
48
pyflakes==2.4.0
49
49
pygments==2.12.0
50
- pymdown-extensions==9.4
50
+ pymdown-extensions==9.5
51
51
pyparsing==3.0.9
52
52
pytest-cov==3.0.0
53
53
pytest-html==3.1.1
@@ -59,16 +59,16 @@ python-dotenv==0.20.0
59
59
pyyaml-env-tag==0.1
60
60
pyyaml==6.0
61
61
radon==5.1.0
62
- requests==2.27.1
63
- s3transfer==0.5.2
62
+ requests==2.28.0
63
+ s3transfer==0.6.0
64
64
six==1.16.0
65
65
smmap==5.0.0
66
66
toml==0.10.2
67
67
tomli==2.0.1
68
68
typing-extensions==4.2.0
69
69
urllib3==1.26.9
70
70
virtualenv==20.14.1
71
- watchdog==2.1.8
71
+ watchdog==2.1.9
72
72
xenon==0.9.0
73
73
yapf==0.32.0
74
74
zipp==3.8.0
Original file line number Diff line number Diff line change @@ -15,12 +15,25 @@ Run ``make dev``
15
15
Create a cloudformation stack by running `` make deploy ``
16
16
17
17
18
- ## ** Tests**
19
- Unit tests can be found under the `` tests `` folder.
18
+ ## ** Unit Tests**
19
+ Unit tests can be found under the `` tests/unit `` folder.
20
+
21
+ You can run the tests by using the following command: `` make unit ``
22
+
23
+ ## ** Integration Tests**
24
+ Make sure you deploy the stack first as these tests trigger your lambda handler LOCALLY but they can communicate with AWS services.
25
+
26
+ These tests allow you to debug in your IDE your AWS Lambda function.
27
+
28
+ Integration tests can be found under the `` tests/integration `` folder.
29
+
20
30
You can run the tests by using the following command: `` make unit ``
21
31
22
32
## ** E2E Tests**
23
33
Make sure you deploy the stack first.
34
+
35
+ E2E tests can be found under the `` tests/e2e `` folder.
36
+
24
37
These tests send a 'POST' message to the deployed API GW and trigger the Lambda function on AWS.
25
38
26
39
The tests are run automatically by: `` make e2e ``
Original file line number Diff line number Diff line change 1
1
-i https://pypi.org/simple
2
- aws-lambda-powertools==1.26.0
2
+ aws-lambda-powertools==1.26.1
3
3
aws-xray-sdk==2.9.0
4
- boto3==1.23.9
5
- botocore==1.26.9
4
+ boto3==1.24.7
5
+ botocore==1.27.7
6
6
dnspython==2.2.1
7
7
email-validator==1.2.1
8
8
fastjsonschema==2.15.3
@@ -11,7 +11,7 @@ idna==3.3
11
11
jmespath==1.0.0
12
12
pydantic[email]==1.9.1
13
13
python-dateutil==2.8.2
14
- s3transfer==0.5.2
14
+ s3transfer==0.6.0
15
15
six==1.16.0
16
16
typing-extensions==4.2.0
17
17
urllib3==1.26.9
File renamed without changes.
You can’t perform that action at this time.
0 commit comments