Skip to content

Commit

Permalink
Hotfix CI determine_tests_to_run (ray-project#8039)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadn authored Apr 16, 2020
1 parent 7455610 commit 956ea7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ci/travis/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ init() {

local variable_definitions
variable_definitions=($(python "${ROOT_DIR}"/determine_tests_to_run.py))
{ declare "${variable_definitions[@]}"; } > /dev/null 2> /dev/null
if [ 0 -lt "${#variable_definitions[@]}" ]; then
declare "${variable_definitions[@]}"
fi

if ! (set +x && should_run_job ${job_names//,/ }); then
exit 0
Expand Down
2 changes: 1 addition & 1 deletion ci/travis/determine_tests_to_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def list_changed_files(commit_range):
with open(os.environ["GITHUB_EVENT_PATH"], "rb") as f:
event = json.loads(f.read())
base = event["pull_request"]["base"]["sha"]
commit_range = "{}...{}".format(base, event["after"])
commit_range = "{}...{}".format(base, event.get("after", ""))
files = list_changed_files(commit_range)

print(pformat(files), file=sys.stderr)
Expand Down

0 comments on commit 956ea7c

Please sign in to comment.