Skip to content

Commit

Permalink
Build: Enable caching for CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Apr 12, 2021
1 parent a259bfb commit 7cd99a2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,19 @@ jobs:

name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
PUPPETEER_DOWNLOAD_PATH: ~/.puppeteer_download
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
if: ${{ runner.os != 'Windows' }}
with:
path: |
~/.npm
~/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
Expand All @@ -57,9 +67,17 @@ jobs:
sm-test:
name: SpiderMonkey
runs-on: ubuntu-20.04
env:
PUPPETEER_DOWNLOAD_PATH: ~/.puppeteer_download
steps:
- uses: actions/checkout@v2
- name: Use Node.js 10.x
- uses: actions/cache@v2
with:
path: |
~/.npm
~/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js 10
uses: actions/setup-node@v2
with:
node-version: 10.x
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ jobs:
run:
name: Code coverage
runs-on: ubuntu-20.04
env:
PUPPETEER_DOWNLOAD_PATH: ~/.puppeteer_download
steps:
- uses: actions/checkout@v2

- name: Use Node.js 10.x
- uses: actions/cache@v2
with:
path: |
~/.npm
~/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Use Node.js 10
uses: actions/setup-node@v2
with:
node-version: 10.x
Expand Down

0 comments on commit 7cd99a2

Please sign in to comment.