Remove node_modules caching to prevent dir related errors.

This commit is contained in:
vedanshujain 2021-03-12 09:54:37 +05:30
parent cad8ae3413
commit 934243d8bd
1 changed files with 1 additions and 42 deletions

View File

@ -21,38 +21,11 @@ jobs:
name: woocommerce
path: ${{ steps.build.outputs.zip_path }}
retention-days: 7
e2e-tests-cache:
name: Set e2e caches for running tests
runs-on: ubuntu-latest
steps:
- name: Checkout code.
uses: actions/checkout@v2
- name: Load Node.js.
uses: actions/setup-node@v2
with:
node-version: '12'
# From https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#using-the-cache-action
- name: Cache node modules
uses: actions/cache@v2
id: cache_node_modules
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Run npm install, and cache if they aren't.
run: npm install
e2e-tests-run:
name: Runs E2E tests.
runs-on: ubuntu-latest
needs: [ build, e2e-tests-cache ]
needs: [ build ]
steps:
- name: Create dirs.
@ -66,20 +39,6 @@ jobs:
uses: actions/checkout@v2
with:
path: package/woocommerce
# From https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#using-the-cache-action
- name: Cache node modules
uses: actions/cache@v2
id: cache_node_modules
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-
- name: Restore node modules from cache, if available.
run: mv ./node_modules package/woocommerce/node_modules
- name: Run npm install.
working-directory: package/woocommerce