Skip to content

Commit

Permalink
Update the target branch in testing to reduce the testing diff.
Browse files Browse the repository at this point in the history
As title. This is to make the "files changed" that public CI has
to check smaller as it's against the release branch and not
`main`.
  • Loading branch information
stuartarchibald committed Oct 12, 2022
1 parent 334ba96 commit ba8b99e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions numba/testing/main.py
Expand Up @@ -207,7 +207,8 @@ def git_diff_str(x):
parser.add_argument('-g', '--gitdiff', dest='gitdiff', type=git_diff_str,
default=False, nargs='?',
help=('Run tests from changes made against '
'origin/main as identified by `git diff`. '
'origin/release0.56 as identified by'
'`git diff`. '
'If set to "ancestor", the diff compares '
'against the common ancestor.'))
return parser
Expand Down Expand Up @@ -399,9 +400,9 @@ def _choose_gitdiff_tests(tests, *, use_common_ancestor=False):
path = os.path.join('numba', 'tests')
if use_common_ancestor:
print(f"Git diff by common ancestor")
target = 'origin/main...HEAD'
target = 'origin/release0.56...HEAD'
else:
target = 'origin/main..HEAD'
target = 'origin/release0.56..HEAD'
gdiff_paths = repo.git.diff(target, path, name_only=True).split()
# normalise the paths as they are unix style from repo.git.diff
gdiff_paths = [os.path.normpath(x) for x in gdiff_paths]
Expand Down

0 comments on commit ba8b99e

Please sign in to comment.