Skip to content

Commit

Permalink
skip test for other pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
davidovichmarcos committed Aug 14, 2024
1 parent b2211f9 commit 921e3e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
env:
ER_USERNAME: ${{ secrets.ER_USERNAME }}
ER_PASSWORD: ${{ secrets.ER_PASSWORD }}
SKIP_NB_TESTS: True
GCP_DATAFLOW_SERVICE_KEY: ${{ secrets.GCP_DATAFLOW_SERVICE_KEY }}

jobs:
Expand Down Expand Up @@ -33,4 +34,5 @@ jobs:
env:
ER_USERNAME: ${{ secrets.ER_USERNAME }}
ER_PASSWORD: ${{ secrets.ER_PASSWORD }}
SKIP_NB_TESTS: True
GCP_DATAFLOW_SERVICE_KEY: ${{ secrets.GCP_DATAFLOW_SERVICE_KEY }}
3 changes: 2 additions & 1 deletion tests/test_notebooks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import pathlib
from dataclasses import dataclass
import papermill
Expand Down Expand Up @@ -38,12 +39,12 @@ class Notebook:
for p in NB_DIR.rglob("*.ipynb")
]


@pytest.mark.parametrize(
"notebook",
ALL_NOTEBOOKS,
ids=[nb.path.name for nb in ALL_NOTEBOOKS],
)
@pytest.mark.skipif(os.environ.get("SKIP_NB_TESTS"), reason="Nb tests should not run for this pipeline")
def test_notebooks(notebook: Notebook):
try:
papermill.execute_notebook(str(notebook.path), "./output.ipynb", kernel_name="venv")
Expand Down

0 comments on commit 921e3e9

Please sign in to comment.