Skip to content

Commit 4a0376f

Browse files
committed
Update CI jobs to remove unnecessary npm config and use of setup-node
There's no need to change the npm prefix as we don't rely on global package installs for any of the CI jobs. Also remove `setup-node` usage from the build test job as it only needs go. This cuts the time for the build job in half.
1 parent 52088ed commit 4a0376f

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ jobs:
4242
cache-dependency-path: "${{ github.workspace }}/src/github.com/tektoncd/dashboard/go.sum"
4343
go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/dashboard/go.mod"
4444

45-
- name: Set up Node.js
46-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
47-
with:
48-
cache: npm
49-
cache-dependency-path: src/github.com/tektoncd/dashboard/package-lock.json
50-
node-version-file: src/github.com/tektoncd/dashboard/.nvmrc
51-
registry-url: 'https://registry.npmjs.org/'
52-
5345
- name: Install dependencies
5446
run: |
5547
echo "${GOPATH}/bin" >> "$GITHUB_PATH"

test/presubmit-tests.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ function get_node() {
8383
function node_npm_install() {
8484
local failed=0
8585
get_node
86-
echo "Configuring npm"
87-
mkdir ~/.npm-global
88-
npm config set prefix '~/.npm-global'
89-
export PATH=$PATH:$HOME/.npm-global/bin
9086
echo "Installing package dependencies"
9187
npm ci || failed=1 # similar to `npm install` but ensures all versions from lock file
9288
return ${failed}

0 commit comments

Comments
 (0)