-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Add CloudFormation Language Extensions support (Fn::ForEach) #8637
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
base: develop
Are you sure you want to change the base?
Changes from all commits
1ba2f02
5ca1763
d267527
ede506e
adc02f6
8aa7044
9f4b55a
4a852c2
3856180
c3ef249
563b84f
a0d7c4f
2b7ee3b
cd65ba2
452222a
bceb2b3
45941c4
115dbed
eaaf811
89d6013
3732423
2399047
578b2f2
f34414d
903c812
5ad3477
f490b3f
b5b5253
6956c10
c916784
e016af8
fd0bedd
f2d5237
e05d3d2
19bd98e
635bd9e
d56f52c
4d28eef
dd02cd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Coverage config for `make test` which skips cfn_language_extensions tests. | ||
| # Extends the base .coveragerc and also excludes the language extensions source | ||
| # so coverage % isn't penalized when those tests are skipped. | ||
| [run] | ||
| branch = True | ||
| omit = | ||
| samcli/lib/cfn_language_extensions/* | ||
| # Inherited from .coveragerc | ||
| samcli/lib/iac/plugins_interfaces.py | ||
| samcli/lib/init/templates/* | ||
| samcli/hook_packages/terraform/copy_terraform_built_artifacts.py | ||
| [report] | ||
| exclude_lines = | ||
| pragma: no cover | ||
| raise NotImplementedError.* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,11 +26,19 @@ init-latest-release: | |
| bash tests/install-sam-cli-binary.sh | ||
|
|
||
| test: | ||
| # Run unit tests and fail if coverage falls below 94% | ||
| # Run unit tests (excluding cfn_language_extensions) and fail if coverage falls below 94% | ||
| pytest --cov samcli --cov schema --cov-report term-missing --cov-fail-under 94 tests/unit --ignore=tests/unit/lib/cfn_language_extensions --cov-config=.coveragerc_no_lang_ext | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [GENERAL] The default Additionally, the Consider making |
||
|
|
||
| test-lang-ext: | ||
| # Run cfn_language_extensions unit tests with coverage | ||
| pytest --cov samcli.lib.cfn_language_extensions --cov-report term-missing --cov-fail-under 94 tests/unit/lib/cfn_language_extensions | ||
|
|
||
| test-all: | ||
| # Run all unit tests including cfn_language_extensions | ||
| pytest --cov samcli --cov schema --cov-report term-missing --cov-fail-under 94 tests/unit | ||
|
|
||
| test-cov-report: | ||
| # Run unit tests with html coverage report | ||
| # Run all unit tests with html coverage report | ||
| pytest --cov samcli --cov schema --cov-report html --cov-fail-under 94 tests/unit | ||
|
|
||
| integ-test: | ||
|
|
@@ -58,7 +66,17 @@ lint: | |
| mypy --exclude /testdata/ --exclude /init/templates/ --no-incremental setup.py samcli tests schema | ||
|
|
||
| # Command to run everytime you make changes to verify everything works | ||
| dev: lint test | ||
| # Runs test-all if cfn_language_extensions files changed, otherwise test | ||
| dev: lint | ||
| @if git diff --name-only origin/develop... 2>/dev/null | grep -qE 'cfn_language_extensions/'; then \ | ||
| echo "Detected cfn_language_extensions changes — running all tests"; \ | ||
| $(MAKE) test-all; \ | ||
| else \ | ||
| $(MAKE) test; \ | ||
| fi | ||
|
|
||
| # Run full verification including language extensions tests | ||
| dev-all: lint test-all | ||
|
|
||
| black: | ||
| black setup.py samcli tests schema | ||
|
|
@@ -72,8 +90,8 @@ format: black | |
| schema: | ||
| python -m schema.make_schema | ||
|
|
||
| # Verifications to run before sending a pull request | ||
| pr: init schema black-check dev | ||
| # Verifications to run before sending a pull request — runs ALL tests | ||
| pr: init schema black-check lint test-all | ||
|
|
||
| # Update all reproducible requirements using uv (can run from any platform) | ||
| update-reproducible-reqs: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.