test: use action cache v2 (#27491)

This commit is contained in:
骗你是小猫咪 2020-11-02 13:15:56 +08:00 committed by GitHub
parent fa4de9e49a
commit fb77387d26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@master
- name: cache package-lock.json
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}
@ -27,7 +27,7 @@ jobs:
- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -43,25 +43,25 @@ jobs:
uses: actions/checkout@master
- name: restore cache from package-lock.json
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}
- name: restore cache from node_modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: cache lib
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: lib
key: lib-${{ github.sha }}
- name: cache es
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: es
key: es-${{ github.sha }}
@ -80,13 +80,13 @@ jobs:
uses: actions/checkout@master
- name: restore cache from package-lock.json
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}
- name: restore cache from node_modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -112,13 +112,13 @@ jobs:
uses: actions/checkout@master
- name: restore cache from package-lock.json
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}
- name: restore cache from node_modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -134,13 +134,13 @@ jobs:
uses: actions/checkout@master
- name: restore cache from package-lock.json
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}
- name: restore cache from node_modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -156,19 +156,19 @@ jobs:
uses: actions/checkout@master
- name: restore cache from package-lock.json
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}
- name: restore cache from node_modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: restore cache from lib
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: lib
key: lib-${{ github.sha }}
@ -186,19 +186,19 @@ jobs:
uses: actions/checkout@master
- name: restore cache from package-lock.json
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}
- name: restore cache from node_modules
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: restore cache from es
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: es
key: es-${{ github.sha }}