first try cache rust + npm

This commit is contained in:
Pierric Cistac
2020-01-23 16:11:06 -05:00
parent 8b8f2867e5
commit 5dacde7fa4

View File

@ -23,6 +23,30 @@ jobs:
with:
node-version: 12.x
- name: Cache Cargo Registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
- name: Cache Cargo Build Target
uses: actions/cache@v1
with:
path: bindings/node/native/target
key: ${{ runner.os }}-cargo-node-build-${{ hashFiles('**/Cargo.toml') }}
- name: Get NPM cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NPM cache
uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
working-directory: ./bindings/node
run: npm ci --ignore-scripts