diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 934c05bb..67781a43 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -120,8 +120,8 @@ jobs: echo "CI_BUILD_DIR="$(cd ../moodle-local_ci; pwd) >> $GITHUB_ENV # 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 + # Install nvm. + 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 @@ -238,8 +238,8 @@ jobs: echo "CI_BUILD_DIR="$(cd ../moodle-local_ci; pwd) >> $GITHUB_ENV # 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 + # Install nvm. + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash - name: Download PHAR artifact uses: actions/download-artifact@v4 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 26634f5a..ddf9af00 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -9,6 +9,12 @@ This project adheres to [Semantic Versioning](https://semver.org/). The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com). ## [Unreleased] +### Changed +- In order to prevent issue when GH running-image supplied nvm may not work (it is also not included in ubuntu-24.04), we + install last working version explicitly in initialise step. +- ACTION REQUIRED: Update your workflows and add explicit nvm installaton of + version v0.39.7. + ## [4.5.3] - 2024-07-05 ### Added - Support for version 4.4 of the app, that uses new defaults and Chrome (Selenium 4) version. diff --git a/docs/GHAFileExplained.md b/docs/GHAFileExplained.md index 74ea744d..0b1f1e65 100644 --- a/docs/GHAFileExplained.md +++ b/docs/GHAFileExplained.md @@ -97,14 +97,14 @@ jobs: coverage: none # Install this project into a directory called "ci", updating PATH and - # locale, define nvm location. + # locale, install nvm. - name: Initialise moodle-plugin-ci run: | composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4 echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 - echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # Run the default install. # Optionally, it is possible to specify a different Moodle repo to use diff --git a/gha.dist.yml b/gha.dist.yml index 3cdfd061..ee1789dd 100644 --- a/gha.dist.yml +++ b/gha.dist.yml @@ -56,7 +56,8 @@ jobs: echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 - echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV + # Install nvm. + 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 --plugin ./plugin --db-host=127.0.0.1