From 55c4eca08fa1bb0dd656005934bf6f779940f85f Mon Sep 17 00:00:00 2001 From: Kirill Sudarushkin Date: Thu, 30 Nov 2023 09:59:59 +0100 Subject: [PATCH] optimize dependencies install --- .github/workflows/quality.yml | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index f1b8b9c2e..8af697f8f 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -7,22 +7,45 @@ on: pull_request: jobs: + dependencies: + name: Install dependencies + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Read .nvmrc + run: echo ::set-output name=NVMRC::$(cat .nvmrc) + id: nvm + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: "${{ steps.nvm.outputs.NVMRC }}" + cache: "yarn" + + - name: Install dependencies + run: yarn + build-examples: name: Build examples runs-on: ubuntu-latest + needs: dependencies steps: - name: Check out Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Read .nvmrc run: echo ::set-output name=NVMRC::$(cat .nvmrc) id: nvm - name: Setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: "${{ steps.nvm.outputs.NVMRC }}" + cache: "yarn" - name: Install dependencies run: yarn @@ -33,19 +56,21 @@ jobs: run-linters: name: Run linters runs-on: ubuntu-latest + needs: dependencies steps: - name: Check out Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Read .nvmrc run: echo ::set-output name=NVMRC::$(cat .nvmrc) id: nvm - name: Setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: "${{ steps.nvm.outputs.NVMRC }}" + cache: "yarn" - name: Install dependencies run: yarn