Remove node_modules caching to prevent dir related errors.
This commit is contained in:
parent
cad8ae3413
commit
934243d8bd
|
@ -21,38 +21,11 @@ jobs:
|
||||||
name: woocommerce
|
name: woocommerce
|
||||||
path: ${{ steps.build.outputs.zip_path }}
|
path: ${{ steps.build.outputs.zip_path }}
|
||||||
retention-days: 7
|
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:
|
e2e-tests-run:
|
||||||
name: Runs E2E tests.
|
name: Runs E2E tests.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build, e2e-tests-cache ]
|
needs: [ build ]
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Create dirs.
|
- name: Create dirs.
|
||||||
|
@ -66,20 +39,6 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: package/woocommerce
|
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.
|
- name: Run npm install.
|
||||||
working-directory: package/woocommerce
|
working-directory: package/woocommerce
|
||||||
|
|
Loading…
Reference in New Issue