From a3acd8d9f664ab715c633a267f05e050e5d7ede5 Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Fri, 9 Aug 2024 22:36:27 +0100 Subject: [PATCH] Use nvm 0.39.7 --- .github/workflows/test.yml | 10 +++++++++- src/Installer/VendorInstaller.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 934c05bb..0d888183 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -121,7 +121,7 @@ jobs: # PHPUnit depends on en_AU.UTF-8 locale sudo locale-gen en_AU.UTF-8 # Define NVM_DIR pointing to nvm installation. - echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - name: Install moodle-plugin-ci run: moodle-plugin-ci install -vvv @@ -133,6 +133,14 @@ jobs: MUSTACHE_IGNORE_NAMES: 'broken.mustache' MOODLE_APP: ${{ matrix.moodle-app }} + - name: tmp + run: | + cd $CI_BUILD_DIR/moodle + nvm --version + nvm install + nvm use + + - name: Run Integration tests env: MOODLE_BRANCH: ${{ matrix.moodle-branch }} diff --git a/src/Installer/VendorInstaller.php b/src/Installer/VendorInstaller.php index 3f1fb3bc..dfc9202f 100644 --- a/src/Installer/VendorInstaller.php +++ b/src/Installer/VendorInstaller.php @@ -120,7 +120,7 @@ public function installNode(): void } $nvmDir = getenv('NVM_DIR'); - $cmd = ". $nvmDir/nvm.sh && nvm install && nvm use && echo \"NVM_BIN=\$NVM_BIN\""; + $cmd = "source $nvmDir/nvm.sh && nvm --version && nvm install && nvm use && echo \"NVM_BIN=\$NVM_BIN\""; $process = $this->execute->passThroughProcess( Process::fromShellCommandline($cmd, $this->moodle->directory, null, null, null)