Skip to content
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

Test examples as a part of e2e. Create docs on push/PR to main and on publish #592

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: '[Docs and examples] Create docs and run examples'
on:
pull_request:
branches: [ 'main' ]
on:
push:
branches: [ 'main', 'doc_*' ]
release:
types: [ 'published' ]

Expand Down
13 changes: 13 additions & 0 deletions e2e/test_examples.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pathlib
AhmetNSimsek marked this conversation as resolved.
Show resolved Hide resolved
import runpy
import pytest
import sys

examples = pathlib.Path('./examples').resolve().rglob('*.py')
python_version = sys.version_info


@pytest.mark.parametrize('example', examples)
def test_script_execution(example):
print("Running:", example)
runpy.run_path(example)
Loading