Skip to content

Commit 5e6f232

Browse files
committed
Ttest serverless notebooks in actions
1 parent 9e9f89e commit 5e6f232

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎.devcontainer/devcontainer.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// "customizations": {},
99
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
1010
// "remoteUser": "root"
11+
"features": {
12+
"ghcr.io/devcontainers/features/github-cli:1": {}
13+
},
1114
"customizations": {
1215
"vscode": {
1316
"extensions": [

‎.github/workflows/test-notebooks.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,8 @@ jobs:
3333
"
3434
3535
- name: Run pytest
36+
env:
37+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
38+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
39+
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
3640
run: pytest tests/test_notebooks.py -v

‎tests/test_notebooks.py‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@ def find_notebooks():
1212
"""Find all .ipynb files in the repository, excluding executed output notebooks."""
1313
root = Path(__file__).parent.parent
1414
notebooks = []
15+
16+
# Excluded notebooks
17+
excluded_notebooks = {
18+
"bedrock-example.ipynb" # Requires special IAM role assumption
19+
}
20+
1521
for nb_path in root.rglob("*.ipynb"):
1622
# Skip notebooks that are execution outputs or in hidden directories
1723
if "_executed" not in nb_path.name and not any(
1824
part.startswith(".") for part in nb_path.parts
1925
):
20-
notebooks.append(nb_path)
26+
# Skip explicitly excluded notebooks
27+
if nb_path.name not in excluded_notebooks:
28+
notebooks.append(nb_path)
2129
return notebooks
2230

2331

0 commit comments

Comments
 (0)