mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Extract cached yarn logic to a separate file
This commit is contained in:
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -189,26 +189,8 @@ jobs:
|
||||
with:
|
||||
node-version: 12
|
||||
|
||||
- name: Cache node modules
|
||||
id: cacheNodeModules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cacheNodeModules-
|
||||
|
||||
- name: Cache /build/ scripts
|
||||
id: cacheBuildScripts
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: build/**/*.js
|
||||
key: ${{ runner.os }}-cacheBuildScripts-${{ hashFiles('build/yarn.lock', 'build/tsconfig.json', 'build/tsconfig.build.json', 'build/**/*.ts', '!**/node_modules/**/*.ts') }}
|
||||
|
||||
- name: Execute yarn
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' || steps.cacheBuildScripts.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile
|
||||
- name: Cached yarn
|
||||
uses: ./ci/cached-yarn
|
||||
|
||||
- name: Run Monaco Editor Checks
|
||||
run: yarn monaco-compile-check
|
||||
|
||||
24
.github/workflows/ci/cached-yarn.yml
vendored
Normal file
24
.github/workflows/ci/cached-yarn.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Cached yarn
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Cache node modules
|
||||
id: cacheNodeModules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cacheNodeModules-
|
||||
|
||||
- name: Cache /build/ scripts
|
||||
id: cacheBuildScripts
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: build/**/*.js
|
||||
key: ${{ runner.os }}-cacheBuildScripts-${{ hashFiles('build/yarn.lock', 'build/tsconfig.json', 'build/tsconfig.build.json', 'build/**/*.ts', '!**/node_modules/**/*.ts') }}
|
||||
|
||||
- name: Execute yarn
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' || steps.cacheBuildScripts.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile
|
||||
Reference in New Issue
Block a user