Skip to content

Commit

Permalink
chore: update npm install command
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Dec 24, 2023
1 parent 0e50b94 commit 9844cf7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/deploy-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 9844cf7

Please sign in to comment.