ci: speed up by caching chromium (#193)
This commit is contained in:
@@ -35,11 +35,35 @@ jobs:
|
||||
- name: Cache dependencies
|
||||
run: deno cache --no-check src/cli/deps.ts src/runtime/deps.ts src/server/deps.ts
|
||||
|
||||
- name: Setup puppeteer linux / mac
|
||||
- name: Cache Chrome (Linux)
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/deno/deno_puppeteer
|
||||
key: chrome-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }}
|
||||
restore-keys: chrome-${{ runner.os }}-
|
||||
|
||||
- name: Cache Chrome (macOS)
|
||||
if: startsWith(matrix.os, 'mac')
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/Library/Caches/deno/deno_puppeteer
|
||||
key: chrome-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }}
|
||||
restore-keys: chrome-${{ runner.os }}-
|
||||
|
||||
- name: Cache Chrome (Windows)
|
||||
if: startsWith(matrix.os, 'win')
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "C:\\Users\\RUNNER~1\\AppData\\Local\\deno\\deno_puppeteer"
|
||||
key: chrome-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }}
|
||||
restore-keys: chrome-${{ runner.os }}-
|
||||
|
||||
- name: Install Chromium (Unix)
|
||||
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'mac')
|
||||
run: PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@9.0.2/install.ts
|
||||
|
||||
- name: Setup puppeteer windows
|
||||
- name: Install Chromium (Windows)
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
run: set "PUPPETEER_PRODUCT=chrome" && deno run -A --unstable https://deno.land/x/puppeteer@9.0.2/install.ts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user