Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Mar 26, 2024
1 parent 847a790 commit 89c610a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .ci/ignore_treon_linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ stable-diffusion-ip-adapter
kosmos2-multimodal-large-language-model
photo-maker
openvoice
surya-line-level-text-detection
instant-id
stable-diffusion-keras-cv
style-transfer-webcam
2 changes: 0 additions & 2 deletions .ci/ignore_treon_mac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ mobilevlm-language-assistant
kosmos2-multimodal-large-language-model
photo-maker
openvoice
surya-line-level-text-detection
instant-id
grounded-segment-anything
stable-diffusion-keras-cv
style-transfer-webcam
2 changes: 0 additions & 2 deletions .ci/ignore_treon_win.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,4 @@ stable-diffusion-ip-adapter
kosmos2-multimodal-large-language-model
photo-maker
openvoice
surya-line-level-text-detection
instant-id
stable-diffusion-keras-cv
16 changes: 10 additions & 6 deletions .ci/validate_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ def prepare_test_plan(test_list, ignore_list, nb_dir=None):
notebooks = sorted(list(notebooks_dir.rglob('**/*.ipynb')))
statuses = {notebook.parent.relative_to(notebooks_dir): {'status': '', 'path': notebook.parent} for notebook in notebooks}
test_list = test_list or statuses.keys()
if ignore_list is not None and len(ignore_list) == 1 and ignore_list[0].endswith('.txt'):
with open(ignore_list[0], 'r') as f:
ignore_list = list(map(lambda x: x.strip(), f.readlines()))
print(f"ignored notebooks: {ignore_list}")
ignored_notebooks = []
if ignore_list is not None:
for ig_nb in ignore_list:
if ig_nb.endswith('.txt'):
with open(ig_nb, 'r') as f:
ignored_notebooks.extend(list(map(lambda x: x.strip(), f.readlines())))
else:
ignored_notebooks.append(ig_nb)
print(f"ignored notebooks: {ignored_notebooks}")

if len(test_list) == 1 and test_list[0].endswith('.txt'):
testing_notebooks = []
Expand All @@ -64,8 +69,7 @@ def prepare_test_plan(test_list, ignore_list, nb_dir=None):
else:
test_list = set(map(lambda x: Path(x), test_list))

ignore_list = ignore_list or []
ignore_list = set(map(lambda x: Path(x), ignore_list))
ignore_list = set(map(lambda x: Path(x), ignored_notebooks))

for notebook in statuses:
if notebook not in test_list:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/treon_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,14 @@ jobs:
# Main notebooks test. Verifies that all notebooks run without errors
- name: Analysing with treon (Windows)
if: runner.os == 'Windows'
if: runner.os == 'Windows' && matrix.python != '3.8'
run: |
python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_win.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --move_notebooks_dir c:/notebooks
shell: bash
if: runner.os == 'Windows' && matrix.python == '3.8'
run: |
python .ci/validate_notebooks.py --test_list test_notebooks.txt --ignore_list .ci/ignore_treon_win.txt .ci/ignore_treon_py38.txt --report_dir test_report/${{matrix.os}}-${{ matrix.python }} --move_notebooks_dir c:/notebooks
shell: bash
- name: Analysing with treon (Linux)
if: runner.os == 'Linux'
run: |
Expand Down

0 comments on commit 89c610a

Please sign in to comment.