Skip to content

Commit

Permalink
CI: Remove node modules cache and instead use prefer-offline
Browse files Browse the repository at this point in the history
  • Loading branch information
Mintoo200 committed Mar 14, 2024
1 parent 4ad4ef4 commit 095f03e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@ jobs:
# TODO: add version to a .nvmrc or at least a variable
node-version: 18.12.1
cache: npm
- name: Cache node modules
id: cache-packages
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ hashFiles('package-lock.json') }}
- name: Install
if: ${{ steps.cache-packages.outputs.cache-hit != 'true' }}
run: npm ci --omit=dev
run: npm ci --omit=dev --prefer-offline
- name: Build
run: npm run build
- name: Upload artifact
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ jobs:
# TODO: add version to a .nvmrc or at least a variable
node-version: 18.12.1
cache: npm
- name: Cache node modules
id: cache-packages
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ hashFiles('package-lock.json') }}
- name: Install
run: npm ci
run: npm ci --prefer-offline
- name: Run tests
run: npm run test:unit

0 comments on commit 095f03e

Please sign in to comment.