mirror of
https://github.com/alibaba/ice.git
synced 2024-10-23 07:04:52 +08:00
chore: changes the cache location for Puppeteer (#5893)
* chore: changes the cache location for Puppeteer * fix: ci * fix: ignore file
This commit is contained in:
parent
34077db7cd
commit
08ef3b745c
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@ -26,14 +26,23 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: Cache .pnpm-store
|
||||
id: cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
- name: Install pnpm
|
||||
run: npm i pnpm -g
|
||||
uses: pnpm/action-setup@v2.2.2
|
||||
with:
|
||||
run_install: false
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-cache
|
||||
run: |
|
||||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: |
|
||||
${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
.cache
|
||||
key: ${{ runner.os }}-pnpm-store-node-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-node-${{ matrix.node-version }}
|
||||
- run: npm run setup
|
||||
- run: npm run dependency:check
|
||||
- run: npm run lint
|
||||
|
8
.github/workflows/coverage.yml
vendored
8
.github/workflows/coverage.yml
vendored
@ -52,10 +52,12 @@ jobs:
|
||||
- uses: actions/cache@v3
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
key: ${{ runner.os }}-pnpm-store-node-jest-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
path: |
|
||||
${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
|
||||
.cache
|
||||
key: ${{ runner.os }}-pnpm-store-node-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-node-jest-${{ matrix.node-version }}
|
||||
${{ runner.os }}-pnpm-store-node-${{ matrix.node-version }}
|
||||
- run: npm run setup
|
||||
- run: npm run cov
|
||||
- name: Upload coverage to Codecov
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,6 +27,7 @@ coverage
|
||||
.happypack
|
||||
.vscode
|
||||
.tmp
|
||||
.cache
|
||||
*.swp
|
||||
*.dia~
|
||||
*.temp.json
|
||||
|
9
.puppeteerrc.cjs
Normal file
9
.puppeteerrc.cjs
Normal file
@ -0,0 +1,9 @@
|
||||
const { join } = require('path');
|
||||
|
||||
/**
|
||||
* @type {import("puppeteer").Configuration}
|
||||
*/
|
||||
module.exports = {
|
||||
// Changes the cache location for Puppeteer.
|
||||
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
|
||||
};
|
Loading…
Reference in New Issue
Block a user