Skip to content

Commit

Permalink
Add yarn caching, and allow for PR testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Dec 10, 2019
1 parent e3a68c7 commit 4322ffb
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -29,11 +29,20 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Install yarn package manager
run: npm install -g yarn

- name: Install deps and build
run: yarn install --frozen-lockfile

- name: Run tests
run: yarn test --runInBand --no-cache --coverage
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps, build, and test
run: |
node --version
npm --version
yarn --version
yarn install --frozen-lockfile
yarn test --coverage
env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096

0 comments on commit 4322ffb

Please sign in to comment.