Skip to content

Commit

Permalink
Github CI only run doctests when tests are not run (#1077)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Adkisson <[email protected]>
  • Loading branch information
h-mayorquin and pauladkisson authored Sep 13, 2024
1 parent 679418c commit f7e9c4e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/assess-file-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
echo "CHANGELOG_UPDATED=false" >> $GITHUB_OUTPUT
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo $file
if [[ $file == "src/"* || $file == "tests/"* || $file == "requirements-minimal.txt" || $file == "requirements-testing.txt" || $file == "setup.py" || $file == ".github/"* ]]
if [[ $file == "src/"* || $file == "tests/"* || $file == "pyproject.toml" || $file == "setup.py" || $file == ".github/"* ]]
then
echo "Source changed"
echo "SOURCE_CHANGED=true" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

run-doctests-only:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.CONVERSION_GALLERY_CHANGED == 'true' || needs.assess-file-changes.outputs.SOURCE_CHANGED != 'true' }}
if: ${{ needs.assess-file-changes.outputs.CONVERSION_GALLERY_CHANGED == 'true' && needs.assess-file-changes.outputs.SOURCE_CHANGED != 'true' }}
uses: ./.github/workflows/doctests.yml

check-final-status:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Added automated EFS volume creation and mounting to the `submit_aws_job` helper function. [PR #1018](https://github.com/catalystneuro/neuroconv/pull/1018)

## Improvements
* Modified the CI to avoid running doctests twice [PR #1077](https://github.com/catalystneuro/neuroconv/pull/#1077)

## v0.6.3

Expand Down
2 changes: 1 addition & 1 deletion docs/conversion_examples_gallery/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ def add_data_space(doctest_namespace, tmp_path):
doctest_namespace["OPHYS_DATA_PATH"] = OPHYS_DATA_PATH
doctest_namespace["TEXT_DATA_PATH"] = TEXT_DATA_PATH

doctest_namespace["path_to_save_nwbfile"] = Path(tmp_path) / "file.nwb"
doctest_namespace["path_to_save_nwbfile"] = Path(tmp_path) / "doctest_file.nwb"
doctest_namespace["output_folder"] = Path(tmp_path)

0 comments on commit f7e9c4e

Please sign in to comment.