Skip to content

Commit 87388eb

Browse files
committed
Update CI jobs to correctly use npm cache
Also remove `setup-node` usage from the build test job as it only needs go.
1 parent 2ecef9a commit 87388eb

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-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@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.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: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,17 @@ 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
86+
# echo "Configuring npm"
87+
# set -x
88+
# mkdir ~/.npm-global
89+
# echo "Get npm cache location"
90+
# npm config get cache
91+
# echo "Set npm prefix"
92+
# npm config set prefix '~/.npm-global'
93+
# echo "Get npm cache location"
94+
# npm config get cache
95+
# export PATH=$PATH:$HOME/.npm-global/bin
96+
# set +x
9097
echo "Installing package dependencies"
9198
npm ci || failed=1 # similar to `npm install` but ensures all versions from lock file
9299
return ${failed}

0 commit comments

Comments
 (0)