From 692300cdc980af0a601ed0b495d1ee3233916100 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 5 Sep 2021 18:14:18 +0200 Subject: [PATCH] CI: Use immutable flag and built-in caching Signed-off-by: David Mehren --- .github/workflows/nest.js.yml | 52 ++++++----------------------------- 1 file changed, 8 insertions(+), 44 deletions(-) diff --git a/.github/workflows/nest.js.yml b/.github/workflows/nest.js.yml index d560e974c..fb7c7a339 100644 --- a/.github/workflows/nest.js.yml +++ b/.github/workflows/nest.js.yml @@ -25,17 +25,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: 16 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output 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- - - run: yarn --frozen-lockfile --prefer-offline + cache: 'yarn' + - run: yarn install --immutable - run: ${{matrix.command}} build: runs-on: ubuntu-latest @@ -48,17 +39,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output 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- - - run: yarn --frozen-lockfile --prefer-offline + cache: 'yarn' + - run: yarn install --immutable - run: yarn run build integration-tests: @@ -71,17 +53,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: 16 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output 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- - - run: yarn --frozen-lockfile --prefer-offline + cache: 'yarn' + - run: yarn install --immutable - run: yarn run test:cov - uses: codecov/codecov-action@v2 with: @@ -98,17 +71,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: 16 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output 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- - - run: yarn --frozen-lockfile --prefer-offline + cache: 'yarn' + - run: yarn install --immutable - run: yarn run test:e2e:cov - uses: codecov/codecov-action@v2 with: