Skip to content

Commit dde3816

Browse files
author
Adrian Perez
committed
Add optional CI_BUILD_DIR environment variable
1 parent 492359b commit dde3816

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
cp -R tests/Fixture/moodle-local_ci ../moodle-local_ci
7575
echo $(cd bin; pwd) >> $GITHUB_PATH
7676
echo $(cd vendor/bin; pwd) >> $GITHUB_PATH
77-
echo "TRAVIS_BUILD_DIR="$(cd ../moodle-local_ci; pwd) >> $GITHUB_ENV
77+
echo "CI_BUILD_DIR="$(cd ../moodle-local_ci; pwd) >> $GITHUB_ENV
7878
# PHPUnit depends on en_AU.UTF-8 locale
7979
sudo locale-gen en_AU.UTF-8
8080
# Define NVM_DIR pointing to nvm installation.

src/Command/InstallCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ protected function configure()
7777
$extra = getenv('EXTRA_PLUGINS_DIR') !== false ? getenv('EXTRA_PLUGINS_DIR') : null;
7878
$node = getenv('NODE_VERSION') !== false ? getenv('NODE_VERSION') : null;
7979

80+
// As there is not only Travis CI, it can also be passed a generic environment variable.
81+
if (null === $plugin) {
82+
$plugin = getenv('CI_BUILD_DIR') !== false ? getenv('CI_BUILD_DIR') : null;
83+
}
84+
8085
$this->setName('install')
8186
->setDescription('Install everything required for CI testing')
8287
->addOption('moodle', null, InputOption::VALUE_REQUIRED, 'Clone Moodle to this directory', 'moodle')

0 commit comments

Comments
 (0)