Skip to content

Commit

Permalink
optimize dependencies install
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillsud committed Nov 30, 2023
1 parent ca9da83 commit 55c4eca
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 55c4eca

Please sign in to comment.