Skip to content

Commit

Permalink
skip blog with images test on windows workers
Browse files Browse the repository at this point in the history
  • Loading branch information
ViStefan committed Oct 29, 2024
1 parent e54d301 commit 1942847
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ jobs:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TIKTOKEN_CACHE_DIR: tests/itest_cache/tiktoken_cache
run: poetry run python tests/run_integration_tests.py
run: poetry run python tests/run_integration_tests.py --os ${{ runner.os }}
2 changes: 1 addition & 1 deletion .github/workflows/integration_test_minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ jobs:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TIKTOKEN_CACHE_DIR: tests/itest_cache/tiktoken_cache
run: poetry run python tests/run_integration_tests.py --minimal-only
run: poetry run python tests/run_integration_tests.py --minimal-only --os ${{ runner.os }}
20 changes: 18 additions & 2 deletions tests/run_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@
INTEGRATION_TESTS = {}

IPYNB_INTEGRATION_TESTS = {
# "blog_with_images_ipynb": "examples/Blog with Images.ipynb",
"blog_with_images_ipynb": "examples/Blog with Images.ipynb",
"multi_step_research_agent_ipynb": "examples/Multi-step research agent.ipynb",
"math_via_python_code_with_a_single_agent_ipynb": "examples/Math via python code with a single agent.ipynb",
"validating_agent_output_ipynb": "examples/Validating agent output.ipynb",
"advanced_output_handling_ipynb": "examples/Advanced output handling.ipynb",
# "using_autogen_with_motleycrew_ipynb": "examples/Using AutoGen with motleycrew.ipynb"
"using_autogen_with_motleycrew_ipynb": "examples/Using AutoGen with motleycrew.ipynb"
}

INTEGRATION_TESTS_TO_SKIP = {
"Windows": [
"blog_with_images_ipynb"
]
}

MINIMAL_INTEGRATION_TESTS = {}
Expand Down Expand Up @@ -75,6 +81,10 @@ def get_args_parser():
parser.add_argument(
"--minimal-only", default=False, action="store_true", help="Run minimal tests"
)
parser.add_argument(
# added to skip problematic tests on Windows workers in GutHub Actions
"--os", type=str, default="Unix", help="Target operating system"
)

return parser

Expand Down Expand Up @@ -150,6 +160,7 @@ def run_integration_tests(
cache_dir: str,
test_names: Optional[list[str]] = None,
minimal_only: bool = False,
target_os: str = "Unix",
):
failed_tests = {}

Expand All @@ -170,6 +181,10 @@ def run_integration_tests(
if test_names and current_test_name not in test_names:
continue

if target_os in INTEGRATION_TESTS_TO_SKIP and current_test_name in INTEGRATION_TESTS_TO_SKIP[target_os]:
logger.info("Skipping test %s for target platform %s", current_test_name, target_os)
continue

logger.info("Running test: %s", current_test_name)

cache_sub_dir = os.path.join(cache_dir, current_test_name)
Expand Down Expand Up @@ -209,6 +224,7 @@ def main():
cache_dir=args.cache_dir,
test_names=args.test_names,
minimal_only=args.minimal_only,
target_os=args.os,
)


Expand Down

0 comments on commit 1942847

Please sign in to comment.