diff --git a/.gitea/workflows/azure-pipelines.yml b/.gitea/workflows/azure-pipelines.yml index 38d94c7..ecf98f8 100644 --- a/.gitea/workflows/azure-pipelines.yml +++ b/.gitea/workflows/azure-pipelines.yml @@ -15,6 +15,23 @@ jobs: with: fetch-depth: 0 + # Host runner (ubuntu-latest:host) does not load ~/.bashrc — nvm is invisible unless we + # load it here. Persist PATH for all later steps (actions/setup-node, npm, etc.). + - name: Put Node on PATH (NVM for host runner) + run: | + set -euo pipefail + NVM_DIR="${NVM_DIR:-$HOME/.nvm}" + if [ ! -s "$NVM_DIR/nvm.sh" ]; then + echo "NVM not found at $NVM_DIR/nvm.sh. Install nvm for the runner user or add Node to /usr/local/bin." >&2 + exit 1 + fi + # shellcheck source=/dev/null + . "$NVM_DIR/nvm.sh" + nvm use 20 + echo "PATH=$PATH" >> "$GITHUB_ENV" + command -v node + node -v + # ---------------- JAVA (Gradle + SonarScanner need JDK on Ubuntu) ---------------- - name: Setup Java uses: actions/setup-java@v4 diff --git a/App.js b/App.js index 8e1ed41..b1bcf17 100644 --- a/App.js +++ b/App.js @@ -1,3 +1,4 @@ console.log("test1") console.log("trest2") console.log("trest3") +console.log("trest4") \ No newline at end of file