diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d7cb3667e5..a5e5b71c71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -72,16 +72,14 @@ jobs: with: ruby-version: ${{ env.DEFAULT_RUBY_VERSION }} bundler-cache: true - - run: ./dev/ci/setup-host ${{ matrix.integration.label }} - run: | - dscacheutil -q host -a name 127.0.0.1 - dscacheutil -q host -a name localhost - dscacheutil -q host -a name 1.passenger.test - dscacheutil -q host -a name 2.passenger.test - dscacheutil -q host -a name 3.passenger.test - dscacheutil -q host -a name 4.passenger.test - dscacheutil -q host -a name passenger.test + printenv + which -a ruby + ruby -v + which -a gem + gem list rake if: matrix.os == 'macos-latest' + - run: ./dev/ci/setup-host ${{ matrix.integration.label }} - run: ./dev/ci/run-tests-with-docker ${{ matrix.integration.label }} if: matrix.os == 'ubuntu-latest' - run: ./dev/ci/run-tests-natively ${{ matrix.integration.label }} diff --git a/dev/ci/lib/set-container-envvars.sh b/dev/ci/lib/set-container-envvars.sh index 046cb65a38..30f04b618a 100644 --- a/dev/ci/lib/set-container-envvars.sh +++ b/dev/ci/lib/set-container-envvars.sh @@ -38,22 +38,19 @@ fi if [[ -f ~/.rvm/scripts/rvm ]]; then # shellcheck source=/dev/null source ~/.rvm/scripts/rvm - if [[ "$TEST_RUBY_VERSION" != "" ]]; then - header2 "Using Ruby version $TEST_RUBY_VERSION" - run rvm use "$TEST_RUBY_VERSION" - echo - fi elif [[ -f /usr/local/rvm/scripts/rvm ]]; then # shellcheck source=/dev/null source /usr/local/rvm/scripts/rvm +fi + +if command -v rvm; then if [[ "$TEST_RUBY_VERSION" != "" ]]; then - header2 "Using Ruby version $TEST_RUBY_VERSION" - run rvm use "$TEST_RUBY_VERSION" - echo + header2 "Using Ruby version $TEST_RUBY_VERSION" + run rvm use "$TEST_RUBY_VERSION" + echo fi + # RVM's cd override causes problems (probably thanks to bash + # error handling being weird and quirky: + # https://news.ycombinator.com/item?id=14321213) + unset cd fi - -# RVM's cd override causes problems (probably thanks to bash -# error handling being weird and quirky: -# https://news.ycombinator.com/item?id=14321213) -unset cd diff --git a/dev/ci/lib/setup-container.sh b/dev/ci/lib/setup-container.sh index 58cd3c448e..4ea8d10190 100644 --- a/dev/ci/lib/setup-container.sh +++ b/dev/ci/lib/setup-container.sh @@ -11,7 +11,6 @@ if ! grep -q passenger.test /etc/hosts; then 127.0.0.1 4.passenger.test 5.passenger.test 6.passenger.test 127.0.0.1 7.passenger.test 8.passenger.test 9.passenger.test EOF - cat /etc/hosts echo fi diff --git a/dev/ci/scripts/run-tests-natively-stage2.sh b/dev/ci/scripts/run-tests-natively-stage2.sh index 4a98f38867..f566f024f9 100755 --- a/dev/ci/scripts/run-tests-natively-stage2.sh +++ b/dev/ci/scripts/run-tests-natively-stage2.sh @@ -7,10 +7,11 @@ PASSENGER_ROOT=$(cd "$SELFDIR/../../.." && pwd) # shellcheck source=../lib/functions.sh source "$SELFDIR/../lib/functions.sh" +printenv # shellcheck source=../lib/set-container-envvars.sh source "$SELFDIR/../lib/set-container-envvars.sh" add_bundler_path_to_gem_path -echo +printenv header "Running test suite: $1" # shellcheck source=/dev/null