Skip to content

Commit 990dcc8

Browse files
Validate test CloudFormation templates in main lint
1 parent aee5574 commit 990dcc8

8 files changed

Lines changed: 239 additions & 3 deletions

File tree

‎.github/workflows/scripts.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
paths:
66
- 'scripts/**'
7+
- 'cloudformation/**'
78
- 'justfile'
89
- '.mise.toml'
910
- 'pyproject.toml'

‎benchmarks/uv.lock‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎cloudformation/README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ See the [testing guide](../docs/testing.md#github-actions) for initial stack cre
88

99
The benchmark-specific template is maintained separately in [benchmarks/cloudformation/](../benchmarks/cloudformation/).
1010

11+
## Validation
12+
13+
Run `just lint` from the repository root to check the templates in this directory with cfn-lint alongside the Python checks.
14+
This validation requires no AWS credentials.
15+
The benchmark template is checked separately by `just benchmark lint`.
16+
1117
## Update an existing stack
1218

1319
Use the AWS CLI locally with credentials that can update the stack and its resources.

‎cloudformation/github_actions_oidc.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Resources:
130130
"s3:ListAllMyBuckets"
131131
]
132132
Resource: [
133-
!Sub "arn:aws:s3:::*"
133+
"arn:aws:s3:::*"
134134
]
135135
- PolicyName: s3tables-access
136136
PolicyDocument:

‎justfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ format:
1515
uvx ruff@{{RUFF_VERSION}} check --select I --fix .
1616
uvx ruff@{{RUFF_VERSION}} format .
1717

18-
# Lint + format check + mypy
18+
# Lint, format check, mypy, and CloudFormation validation
1919
lint:
2020
uvx ruff@{{RUFF_VERSION}} check .
2121
uvx ruff@{{RUFF_VERSION}} format --check .
2222
uv run mypy .
23+
uv run cfn-lint cloudformation/*.yaml
2324

2425
# Run tests: just test (pyathena|sqla|sqla-async)
2526
test target="help":

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ dev = [
8989
"myst-parser",
9090
"sphinx-design",
9191
"types-python-dateutil",
92+
"cfn-lint>=1",
9293
]
9394

9495
[build-system]

‎scripts/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AWS test infrastructure templates are in [cloudformation/](../cloudformation/).
66

77
## Validation
88

9-
Run the Python checks, ShellCheck, actionlint, and offline script tests from the repository root:
9+
Run the Python and CloudFormation checks, ShellCheck, actionlint, and offline script tests from the repository root:
1010

1111
```bash
1212
mise install shellcheck actionlint

‎uv.lock‎

Lines changed: 226 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)