Skip to content

Commit

Permalink
ci: move critical env(s) before upgrade to npm 8 (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Apr 7, 2022
1 parent c2af899 commit 4703f1c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
23 changes: 15 additions & 8 deletions .github/actions/nodejs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
node-version:
description: Node.js version
required: false
default: 14.x
default: 16.x

runs:
using: composite
Expand All @@ -21,10 +21,8 @@ runs:
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules/
!node_modules/.cache
!*/*/node_modules/.cache
**/node_modules/
!**/node_modules/.cache
key: modules-cache__nodejs-${{ inputs.node-version }}__${{ hashfiles('**/package-lock.json') }}

- name: Restore from cache of builds
Expand All @@ -33,8 +31,7 @@ runs:
uses: actions/cache@v3
with:
path: |
node_modules/.cache
*/*/node_modules/.cache
**/node_modules/.cache
key: builds-cache-hash__${{ hashFiles('**/package-lock.json') }}-${{ github.ref }}
restore-keys: builds-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}

Expand All @@ -46,6 +43,16 @@ runs:
key: npm-cache__nodejs-${{ inputs.node-version }}__${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-cache-hash__

- run: npm ci
- name: Clean install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
env:
NPM_CONFIG_CACHE: ~/.npm
CYPRESS_CACHE_FOLDER: ./node_modules/cache-cypress
run: npm ci
shell: bash

- name: environment
shell: bash
run: |
node -v
npm -v
1 change: 1 addition & 0 deletions .github/workflows/demo-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
runs-on: ubuntu-latest
env:
FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
CYPRESS_CACHE_FOLDER: ./node_modules/cache-cypress

services:
sorry-cypress-director:
Expand Down
8 changes: 4 additions & 4 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node-options="--max-old-space-size=12288 --unhandled-rejections=strict"
prefer-offline=true
cache=~/.npm/
FORCE_COLOR=1
CYPRESS_CACHE_FOLDER=node_modules/.cache-cypress
legacy-peer-deps=true
engine-strict=false
ignore-engines=true
loglevel=error

0 comments on commit 4703f1c

Please sign in to comment.