From b8cc9a1cbb71a5657a9f8eeb580982e1829c4d1c Mon Sep 17 00:00:00 2001 From: mehrdadn Date: Mon, 8 Jun 2020 23:48:02 -0700 Subject: [PATCH] Change GitHub Actions path to one with spaces (#8850) Co-authored-by: Mehrdad --- .github/workflows/main.yml | 3 ++- ci/travis/test-wheels.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e572816a..7f01baa92 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,6 @@ jobs: python-version: 3.6 env: PYTHON: ${{ matrix.python-version }} - TRAVIS_BUILD_DIR: ${{ github.workspace }} TRAVIS_COMMIT: ${{ github.sha }} #TRAVIS_PULL_REQUEST is defined in the scripts to account for "false" steps: @@ -37,6 +36,8 @@ jobs: shell: bash -e -o pipefail -l {0} run: | # Note: only configure settings here that are required _before_ the repository is cloned (such as Git settings). + # Put a path with spaces (and use common words like 'src') to verify correct builds + export GITHUB_WORKSPACE="${GITHUB_WORKSPACE%/*} src/${GITHUB_WORKSPACE##*/}" if [ ! -f ~/.profile ] && [ ! -f ~/.bash_profile ]; then # missing on some machines, but needed for ~/.bashrc echo 'if [ -n "${BASH_VERSION}" ] && [ -f ~/.bashrc ]; then . ~/.bashrc; fi' >> ~/.profile fi diff --git a/ci/travis/test-wheels.sh b/ci/travis/test-wheels.sh index 8a78b6074..07425a876 100755 --- a/ci/travis/test-wheels.sh +++ b/ci/travis/test-wheels.sh @@ -16,9 +16,13 @@ case "${OSTYPE}" in *) echo "Unrecognized platform."; exit 1;; esac -TEST_DIR="$TRAVIS_BUILD_DIR/python/ray/tests" +BUILD_DIR="${TRAVIS_BUILD_DIR-}" +if [ -z "${BUILD_DIR}" ]; then + BUILD_DIR="${GITHUB_WORKSPACE}" +fi +TEST_DIR="${BUILD_DIR}/python/ray/tests" TEST_SCRIPTS=("$TEST_DIR/test_microbenchmarks.py" "$TEST_DIR/test_basic.py") -UI_TEST_SCRIPT="$TRAVIS_BUILD_DIR/python/ray/tests/test_webui.py" +UI_TEST_SCRIPT="${BUILD_DIR}/python/ray/tests/test_webui.py" function retry { local n=1