From 47f47b86f3811e586eca50068e0772016d5b97c2 Mon Sep 17 00:00:00 2001 From: GyDi Date: Fri, 24 Dec 2021 14:02:02 +0800 Subject: [PATCH] test: use cache --- .github/workflows/test.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 165572a..59e2ce5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,25 @@ jobs: uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Get yarn cache dir path + id: yarn-cache-dir-path + run: echo "::set-outpout name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + src-tauri/target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: install app dependencies and build it run: yarn && yarn run predev && yarn build - uses: tauri-apps/tauri-action@v0