File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 64
64
git config --global user.email '[email protected] '
65
65
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
66
66
git commit -am "$last_commit"
67
- git push
67
+ git diff --quiet @{u} HEAD || git push
Original file line number Diff line number Diff line change @@ -106,8 +106,7 @@ jobs:
106
106
run : | # we need a separate step because of the bash-specific if-statement in the previous one.
107
107
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
108
108
- name : Check for files left behind by test
109
- # skip 3.8 as it fails only for Python 3.8 for no explainable reason.
110
- if : matrix.os != 'windows-latest' && matrix.python-version != '3.8' && always()
109
+ if : matrix.os != 'windows-latest' && always()
111
110
run : |
112
111
before="${{ steps.status-before.outputs.BEFORE }}"
113
112
after="$(git status --porcelain -b)"
Original file line number Diff line number Diff line change 25
25
26
26
import logging
27
27
import os
28
+ import shutil
28
29
from pathlib import Path
29
30
import pytest
30
31
@@ -164,6 +165,15 @@ def pytest_sessionfinish() -> None:
164
165
# Local file deletion
165
166
new_file_list = read_file_list ()
166
167
compare_delete_files (file_list , new_file_list )
168
+
169
+ # Delete any test dirs that remain
170
+ # In edge cases due to a mixture of pytest parametrization and oslo concurrency,
171
+ # some file lock are created after leaving the test. This removes these files!
172
+ test_files_dir = Path (__file__ ).parent .parent / "openml"
173
+ for f in test_files_dir .glob ("tests.*" ):
174
+ if f .is_dir ():
175
+ shutil .rmtree (f )
176
+
167
177
logger .info ("Local files deleted" )
168
178
169
179
logger .info (f"{ worker } is killed" )
You can’t perform that action at this time.
0 commit comments