diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b04a142..667bbda 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -27,7 +27,7 @@ jobs: - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: 'package.json' - name: 'npm build' run: 'npm ci && npm run build' @@ -56,7 +56,7 @@ jobs: - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: 'package.json' - name: 'npm build' run: 'npm ci && npm run build' diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 11223bc..4fcdf1f 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -35,17 +35,11 @@ jobs: - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # ratchet:actions/setup-node@v4 with: - node-version: '20.x' + node-version-file: 'package.json' - name: 'npm build' run: 'npm ci && npm run build' - - name: 'npm lint' - # There's no need to run the linter for each operating system, since it - # will find the same thing 3x and clog up the PR review. - if: ${{ matrix.os == 'ubuntu-latest' }} - run: 'npm run lint' - - uses: 'google-github-actions/auth@v2' # ratchet:exclude with: workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}' diff --git a/bin/runTests.sh b/bin/runTests.sh index 2c6c21e..c47d2f8 100644 --- a/bin/runTests.sh +++ b/bin/runTests.sh @@ -16,4 +16,6 @@ set -eEuo pipefail FILES="$(node -e "process.stdout.write(require('node:fs').readdirSync('./', { recursive: true }).filter((e) => {return e.endsWith('.test.ts') && !e.startsWith('node_modules');}).sort().join(' '));")" set -x + +# shellcheck disable=SC2086 exec node --require ts-node/register --test-reporter spec --test ${FILES} diff --git a/package.json b/package.json index 56fdcac..5bf328d 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,10 @@ "format": "eslint . --fix", "test": "bash ./bin/runTests.sh" }, + "engines": { + "node": "20.x", + "npm": "10.x" + }, "repository": { "type": "git", "url": "https://github.com/google-github-actions/get-gke-credentials"