Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
Attempt to reduce duplications
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail-syed committed Dec 10, 2020
1 parent 884056f commit 89013b8
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ name: Node-CI
on: push

jobs:
node-lint:
node-install-dependencies:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
name: Checkout
Expand All @@ -34,6 +33,35 @@ jobs:
- name: 📦 Install dependencies
run: yarn --production=false --frozen-lockfile

node-lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

needs: [node-install-dependencies]
steps:
- uses: actions/checkout@v2
name: Checkout

- uses: actions/setup-node@v1
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory
id: yarn-cache-get-dir
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
name: Restore yarn cache
with:
path: ${{ steps.yarn-cache-get-dir.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 💅🏼 Lint
run: |
yarn lint
Expand Down

0 comments on commit 89013b8

Please sign in to comment.