diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70e65f7b0..d81c78b5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,14 +13,22 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: "yarn" + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - run: yarn install --immutable - name: Turbo Cache id: turbo-cache uses: actions/cache@v3 with: path: .turbo - key: ${{ runner.os }}-turbo-${{ github.sha }} + key: ${{ runner.os }}-turbo-lint-${{ github.sha }} restore-keys: | ${{ runner.os }}-turbo- - name: Check Formatting @@ -34,7 +42,15 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: "yarn" + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-test:type-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - run: yarn install --immutable - name: Turbo Cache id: turbo-cache @@ -55,7 +71,15 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - cache: "yarn" + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-test:unit-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - run: yarn install --immutable - name: Turbo Cache id: turbo-cache