Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add end to end testing mechanism #1247

Merged
merged 81 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
22d35a9
Initial commit
May 7, 2022
2b6eb9e
Merge branch 'develop' into feature/e2e-tests
May 7, 2022
5dde53e
Rewrite code to use only cf deployment
May 7, 2022
25c7723
Refactor code to use common libs
May 19, 2022
081b7d9
Enable deploying stack with concrete python version
May 19, 2022
7d34af1
Remove alpha dependency from CDK. Fix package creation
Jun 13, 2022
2cb4c40
Fix different python runtimes errors
Jun 13, 2022
bb0080a
Remove cdk cli installation
Jun 13, 2022
62ddaf7
Fix conflicts
Jun 13, 2022
8f8fc19
Merge branch 'develop' into feature/e2e-tests
mploski Jun 14, 2022
885d5ea
Drop python 3.6 support. Use current secret from github actions
Jun 14, 2022
2b43d3b
Fix PR checks errors
Jun 14, 2022
add97ca
Add note about testing to mantainers document
Jun 14, 2022
ec777f0
Update .github/workflows/run-e2e-tests.yml
mploski Jun 19, 2022
f0030e0
Update .github/workflows/run-e2e-tests.yml
mploski Jun 19, 2022
003cd2b
Update MAINTAINERS.md
mploski Jun 19, 2022
d58d3d5
Update tests/e2e/utils/helpers.py
mploski Jun 19, 2022
4fd8647
Move end to end subsection to its own section under mantainer respons…
Jun 23, 2022
b8e0eab
Remove unnecessary f-string from logger key modification
Jun 23, 2022
29e8ddc
Decouple infra creation step from lambda triggering
Jun 24, 2022
be1a1bb
Implement strategy pattern to generalise infrastructure deployment
Jun 27, 2022
3923fc2
Create helper function for fetching trace metadata
Jun 29, 2022
9afdf3d
Create helper function for fetching trace metadata
Jun 29, 2022
b6e47fe
Add comment to Dockerfile
Jul 1, 2022
82673db
Add typing for AWS services clients
Jul 1, 2022
3034041
Unified types
Jul 1, 2022
0c49b66
Add PR suggestions
Jul 2, 2022
6c1a4d2
fix(logger): preserve std keys when using custom formatters (#1264)
heitorlessa Jul 4, 2022
daf6e03
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Jul 4, 2022
c6de9c1
fix(ci): checkout project before validating related issue workflow
heitorlessa Jul 4, 2022
0f1f1cd
chore(layers): bump to 22 for 1.26.3
heitorlessa Jul 4, 2022
89d33d3
chore(ci): limits concurrency for docs workflow
heitorlessa Jul 4, 2022
c0bb85f
fix(ci): regex to catch combination of related issues workflow
heitorlessa Jul 5, 2022
84eadd1
Update MAINTAINERS.md
mploski Jul 7, 2022
9203232
Update MAINTAINERS.md
mploski Jul 7, 2022
f98df4c
Update MAINTAINERS.md
mploski Jul 7, 2022
936839e
Update tests/e2e/utils/infrastructure.py
mploski Jul 7, 2022
1f570a6
chore(layers): add release pipeline in GitHub Actions (#1278)
Jul 7, 2022
577a410
fix: typo in input for layer workflow
Jul 7, 2022
e0b3b58
fix: no need to cache npm since we only install cdk cli and don't hav…
Jul 7, 2022
925c145
fix: add entire ARN role instead of account and role name
Jul 7, 2022
5bcd026
fix: path to artefact
Jul 7, 2022
46c1754
fix: unzip the right artifact name
Jul 7, 2022
1170e76
docs(event-handler): snippets split, improved, and lint (#1279)
heitorlessa Jul 7, 2022
a34d34d
chore(ci): fix reference error in related_issue
heitorlessa Jul 7, 2022
ad86b10
fix: download artefact into the layer dir
Jul 7, 2022
6848d0b
Merge branch 'develop' of github.com:am29d/aws-lambda-powertools-pyth…
Jul 7, 2022
1962f19
fix: mathc the name of the cdk synth from the build phase
Jul 7, 2022
2ded8a6
fix: sight, yes a whitespace character breaks the build
Jul 7, 2022
fef70b0
docs(core): match code snippet name with filename (#1286)
heitorlessa Jul 8, 2022
d918387
fix(ci): accept core arg in label related issue workflow
heitorlessa Jul 8, 2022
92b475b
docs(graphql): snippets split, improved, and lint (#1287)
heitorlessa Jul 11, 2022
2d4df8a
chore(ci): convert inline gh-script to file
heitorlessa Jul 11, 2022
06965bb
chore(ci): make export PR reusable
heitorlessa Jul 11, 2022
a2c9e34
Refactor asset uploading to use asset manifest
Jul 11, 2022
cf39c60
Merge branch 'feature/e2e-tests' of github.com:mploski/aws-lambda-pow…
Jul 11, 2022
db1b756
fix(ci): move conditionals from yaml to code
heitorlessa Jul 12, 2022
95a8f77
chore(ci): move error prone env to code as constants
heitorlessa Jul 12, 2022
15f0c9e
chore(ci): move all scripts under .github/scripts
heitorlessa Jul 12, 2022
6e5492c
chore(governance): remove any step relying on master branch
heitorlessa Jul 12, 2022
da11802
fix(ci): move conditionals from yaml to code; leftover
heitorlessa Jul 12, 2022
10aaf71
chore(ci): auto-merge cdk lib and lambda layer construct
heitorlessa Jul 12, 2022
b8a0238
chore(deps): bump actions/setup-node from 2 to 3 (#1281)
dependabot[bot] Jul 12, 2022
839e252
fix(ci): escape outputs as certain PRs can break GH Actions expressions
heitorlessa Jul 12, 2022
43e6729
Merge branch 'develop' of https://github.com/awslabs/aws-lambda-power…
heitorlessa Jul 12, 2022
ac07fe2
chore(governance): update emeritus affiliation
heitorlessa Jul 12, 2022
69073b4
chore(ci): disable output debugging as pr body isnt accepted
heitorlessa Jul 12, 2022
0e72f8c
chore(deps): bump aws-cdk-lib from 2.29.0 to 2.31.1 (#1290)
dependabot[bot] Jul 12, 2022
e76a26a
chore(deps): bump cdk-lambda-powertools-python-layer (#1284)
dependabot[bot] Jul 12, 2022
69baefe
docs(homepage): emphasize additional powertools languages (#1292)
heitorlessa Jul 12, 2022
cfc15b8
fix(ci): regex group name for on_merge workflow
heitorlessa Jul 12, 2022
83e6091
chore(deps): bump attrs from 21.2.0 to 21.4.0 (#1282)
dependabot[bot] Jul 12, 2022
c051945
Fix documentation and relative imports
Jul 12, 2022
9db0dcd
PR suggestions applied
Jul 12, 2022
1d832b0
Merge branch 'develop' into feature/e2e-tests
Jul 12, 2022
616c830
Fix makefile coverage html to not include e2e tests
Jul 12, 2022
6e37fce
chore(deps-dev): bump mypy-boto3-dynamodb from 1.24.12 to 1.24.27 (#1…
dependabot[bot] Jul 12, 2022
1ad6efe
Merge branch 'develop' into feature/e2e-tests
mploski Jul 13, 2022
1ad720b
Merge branch 'develop' into feature/e2e-tests
mploski Jul 14, 2022
0dffaf3
Add docstring about using custom s3 asset uploader instead of cdk-assets
Jul 14, 2022
3610d08
chore: typo
heitorlessa Jul 14, 2022
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
35 changes: 35 additions & 0 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: run-e2e-tests
on:
workflow_dispatch: {}
mploski marked this conversation as resolved.
Show resolved Hide resolved
env:
AWS_DEFAULT_REGION: us-east-1
E2E_TESTS_PATH: tests/e2e/
jobs:
run:
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
mploski marked this conversation as resolved.
Show resolved Hide resolved
contents: read
strategy:
matrix:
version: ["3.7", "3.8", "3.9"]
steps:
- name: "Checkout"
uses: actions/checkout@v3
#########################
# Release new version
#########################
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover? Release new version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing. Leftover

- name: "Use Python"
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.version }}
architecture: "x64"
- name: Install dependencies
run: make dev
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_TEST_ROLE_ARN }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Test
run: make e2e-test
11 changes: 10 additions & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [Triage Bug Reports](#triage-bug-reports)
- [Triage RFCs](#triage-rfcs)
- [Releasing a new version](#releasing-a-new-version)
- [Run end to end tests](#run-end-to-end-tests)
- [Changelog generation](#changelog-generation)
- [Bumping the version](#bumping-the-version)
- [Drafting release notes](#drafting-release-notes)
Expand Down Expand Up @@ -171,7 +172,15 @@ Some examples using our initial and new RFC templates: #92, #94, #95, #991, #122

Firstly, make sure you are using the `develop` branch and it is up to date with the origin.

There are three main steps to release a new version: Changelog generation, version bumping, and drafting release notes.
There are four main steps to release a new version: Run end to end tests, Changelog generation, version bumping, and drafting release notes.

#### Run end to end tests
mploski marked this conversation as resolved.
Show resolved Hide resolved

mploski marked this conversation as resolved.
Show resolved Hide resolved
You can run tests either from your local machine's shell by exporting `AWS_PROFILE` environment variable and running `make e2e tests`.
You may also do this directly from GitHub Console. Go to actions tab and choose `run-e2e-tests` workflow from workflow's list. Pick the branch and run tests.
mploski marked this conversation as resolved.
Show resolved Hide resolved

> **Q: What if there's an error?**
To be agreed

#### Changelog generation

Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ lint: format
poetry run flake8 aws_lambda_powertools/* tests/*

test:
poetry run pytest -m "not perf" --cov=aws_lambda_powertools --cov-report=xml
poetry run pytest -m "not (perf or e2e)" --cov=aws_lambda_powertools --cov-report=xml
mploski marked this conversation as resolved.
Show resolved Hide resolved
poetry run pytest --cache-clear tests/performance

unit-test:
poetry run pytest tests/unit

e2e-test:
poetry run pytest -n 3 --dist loadscope --durations=0 --durations-min=1 tests/e2e

coverage-html:
poetry run pytest -m "not perf" --cov=aws_lambda_powertools --cov-report=html
poetry run pytest -m "not (perf or e2e)" --cov=aws_lambda_powertools --cov-report=html
mploski marked this conversation as resolved.
Show resolved Hide resolved

pre-commit:
pre-commit run --show-diff-on-failure
Expand Down
Loading