diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d939ad..5497f6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,14 +12,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v4 + - name: Read .nvmrc + run: echo "{NODE_VERSION}={$(cat .nvmrc)}" >> $GITHUB_OUTPUT + id: nvm + - name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }} + uses: actions/setup-node@v2 with: - node-version: 22.7.0 + node-version: ${{ steps.nvm.outputs.NODE_VERSION }} - name: Checkout repository uses: actions/checkout@v4 - name: Install dependencies run: | - .script/setup - - name: Run lints + ./script/setup + - name: Run lint run: | ./script/test diff --git a/scripts/bootstrap b/script/bootstrap old mode 100644 new mode 100755 similarity index 78% rename from scripts/bootstrap rename to script/bootstrap index 02d914b..59b35ab --- a/scripts/bootstrap +++ b/script/bootstrap @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # script/bootstrap: Resolve all dependencies that the application requires to # run. @@ -7,6 +7,10 @@ set -e cd "$(dirname "$0")/.." + +export NVM_DIR=$HOME/.nvm; +source $NVM_DIR/nvm.sh; + echo "==> Installing node version..." nvm install diff --git a/scripts/server b/script/server old mode 100644 new mode 100755 similarity index 91% rename from scripts/server rename to script/server index 7975338..5c1e0e2 --- a/scripts/server +++ b/script/server @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # script/server: Launch the application diff --git a/scripts/setup b/script/setup old mode 100644 new mode 100755 similarity index 96% rename from scripts/setup rename to script/setup index 76aea9d..6f653f0 --- a/scripts/setup +++ b/script/setup @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # script/setup: Set up the application for the first time after cloning, or set # it back to the initial unused state. diff --git a/scripts/test b/script/test old mode 100644 new mode 100755 similarity index 91% rename from scripts/test rename to script/test index a91a5df..c69b914 --- a/scripts/test +++ b/script/test @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # script/test: Run the test suite for the application.