-
Notifications
You must be signed in to change notification settings - Fork 34
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
run notebook tests automatically if any notebooks have changed #615
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,13 +113,19 @@ jobs: | |
with: | ||
path: ${{ github.run_id }} | ||
|
||
- name: Check for notebook changes | ||
id: check_notebooks | ||
run: check_notebooks=$(git diff --quiet main HEAD -- '*.ipynb' && echo false || echo true) >> $GITHUB_ENV | ||
|
||
- name: Run tests | ||
env: | ||
BIONEMO_DATA_SOURCE: ngc | ||
run: ./ci/scripts/run_pytest.sh --no-nbval --skip-slow | ||
|
||
- name: Run notebook tests | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'INCLUDE_NOTEBOOKS_TESTS') }} | ||
if: | | ||
${{ env.STATE_check_notebooks == 'true' || | ||
contains(github.event.pull_request.labels.*.name, 'INCLUDE_NOTEBOOKS_TESTS') }} | ||
env: | ||
BIONEMO_DATA_SOURCE: ngc | ||
run: pytest --nbval-lax -p no:python docs/ sub-packages/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cant we use here run: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So there's no option in run_pytest to only run the notebook tests, right? This is currently only running the notebook tests in this step, since the previous step ran all the pytests. It just seemed more complicated to try to conditionally add that flag than to conditionally run another step |
||
|
@@ -146,6 +152,5 @@ jobs: | |
steps: | ||
- name: clean up image | ||
run: docker rmi nemoci.azurecr.io/bionemo:${{ github.run_id }} | ||
|
||
# TODO: exclude tests from base image; run tests from github workspace mounted in the image. | ||
# TODO: figure out way of cleaning up working directory (requires sudo or for us to fix file ownership from release container) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be correct