ci: speed up by caching chromium (#193)

This commit is contained in:
Luca Casonato
2022-05-16 17:33:16 +00:00
committed by GitHub
parent 0e2c58578d
commit c28d2ff863
+26 -2
View File
@@ -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