Skip to content

Commit c9706c5

Browse files
committed
Use nvm 0.39.7 explicitly.
This is to have control over image supplied version to prevent regression similar to #309.
1 parent 3842ad1 commit c9706c5

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ jobs:
120120
echo "CI_BUILD_DIR="$(cd ../moodle-local_ci; pwd) >> $GITHUB_ENV
121121
# PHPUnit depends on en_AU.UTF-8 locale
122122
sudo locale-gen en_AU.UTF-8
123-
# Define NVM_DIR pointing to nvm installation.
124-
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
123+
# Install nvm.
124+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
125125
126126
- name: Install moodle-plugin-ci
127127
run: moodle-plugin-ci install -vvv
@@ -238,8 +238,8 @@ jobs:
238238
echo "CI_BUILD_DIR="$(cd ../moodle-local_ci; pwd) >> $GITHUB_ENV
239239
# PHPUnit depends on en_AU.UTF-8 locale
240240
sudo locale-gen en_AU.UTF-8
241-
# Define NVM_DIR pointing to nvm installation.
242-
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
241+
# Install nvm.
242+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
243243
244244
- name: Download PHAR artifact
245245
uses: actions/download-artifact@v4

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ This project adheres to [Semantic Versioning](https://semver.org/).
99
The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com).
1010

1111
## [Unreleased]
12+
### Changed
13+
- In order to prevent issue when GH running-image supplied nvm may not work (it is also not included in ubuntu-24.04), we
14+
install last working version explicitly in initialise step.
15+
- ACTION REQUIRED: Update your workflows and add explicit nvm installaton of
16+
version v0.39.7.
17+
1218
## [4.5.3] - 2024-07-05
1319
### Added
1420
- Support for version 4.4 of the app, that uses new defaults and Chrome (Selenium 4) version.

docs/GHAFileExplained.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ jobs:
9797
coverage: none
9898

9999
# Install this project into a directory called "ci", updating PATH and
100-
# locale, define nvm location.
100+
# locale, install nvm.
101101
- name: Initialise moodle-plugin-ci
102102
run: |
103103
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
104104
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
105105
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
106106
sudo locale-gen en_AU.UTF-8
107-
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
107+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
108108
109109
# Run the default install.
110110
# Optionally, it is possible to specify a different Moodle repo to use

gha.dist.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
5757
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
5858
sudo locale-gen en_AU.UTF-8
59-
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
59+
# Install nvm.
60+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
6061
6162
- name: Install moodle-plugin-ci
6263
run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1

0 commit comments

Comments
 (0)