From 9844cf7ef803972fc22955c46da63e6a2c59ff44 Mon Sep 17 00:00:00 2001 From: solufa Date: Sun, 24 Dec 2023 23:23:52 +0900 Subject: [PATCH] chore: update npm install command --- .github/workflows/deploy-client.yml | 13 +++++++++---- .github/workflows/test.yml | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-client.yml b/.github/workflows/deploy-client.yml index 9a2a93c..f3192cc 100644 --- a/.github/workflows/deploy-client.yml +++ b/.github/workflows/deploy-client.yml @@ -22,10 +22,10 @@ jobs: with: node-version: 18 - uses: actions/cache@v2 - id: root-npm-cache + id: npm-cache with: path: 'node_modules' - key: root-npm-${{ hashFiles('package-lock.json') }} + key: npm-${{ hashFiles('package-lock.json') }} - uses: actions/cache@v2 id: client-npm-cache with: @@ -36,8 +36,13 @@ jobs: with: path: 'server/node_modules' key: server-npm-${{ hashFiles('server/package-lock.json') }} - - run: npm install & npm install --prefix client & npm install --prefix server & wait - if: steps.root-npm-cache.outputs.cache-hit != 'true' || steps.client-npm-cache.outputs.cache-hit != 'true' || steps.server-npm-cache.outputs.cache-hit != 'true' + - run: npm install & + if: steps.npm-cache.outputs.cache-hit != 'true' + - run: npm install --prefix client & + if: steps.client-npm-cache.outputs.cache-hit != 'true' + - run: npm install --prefix server & + if: steps.server-npm-cache.outputs.cache-hit != 'true' + - run: wait - run: npm run build --prefix client env: API_BASE_PATH: ${{ vars.API_BASE_PATH }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 748acfa..5a6e4ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,10 @@ jobs: with: node-version: 18 - uses: actions/cache@v2 - id: root-npm-cache + id: npm-cache with: path: 'node_modules' - key: root-npm-${{ hashFiles('package-lock.json') }} + key: npm-${{ hashFiles('package-lock.json') }} - uses: actions/cache@v2 id: client-npm-cache with: @@ -31,8 +31,13 @@ jobs: with: path: 'server/node_modules' key: server-npm-${{ hashFiles('server/package-lock.json') }} - - run: npm install & npm install --prefix client & npm install --prefix server & wait - if: steps.root-npm-cache.outputs.cache-hit != 'true' || steps.client-npm-cache.outputs.cache-hit != 'true' || steps.server-npm-cache.outputs.cache-hit != 'true' + - run: npm install & + if: steps.npm-cache.outputs.cache-hit != 'true' + - run: npm install --prefix client & + if: steps.client-npm-cache.outputs.cache-hit != 'true' + - run: npm install --prefix server & + if: steps.server-npm-cache.outputs.cache-hit != 'true' + - run: wait - run: npm run generate - run: npm run lint - run: npm run typecheck