mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Also run monaco-editor checks in nightly
This commit is contained in:
parent
2379aa505f
commit
2fb82fb3ad
4 changed files with 94 additions and 11 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -21,11 +21,11 @@ jobs:
|
||||||
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: ${{ runner.os }}-cacheNodeModules-
|
restore-keys: ${{ runner.os }}-cacheNodeModules-
|
||||||
|
|
||||||
- name: Install node modules (1)
|
- name: execute `npm ci` (1)
|
||||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Install node modules (2)
|
- name: execute `npm ci` (2)
|
||||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||||
run: npm ci --prefix webpack-plugin
|
run: npm ci --prefix webpack-plugin
|
||||||
|
|
||||||
|
|
|
||||||
64
.github/workflows/nightly.yml
vendored
64
.github/workflows/nightly.yml
vendored
|
|
@ -14,15 +14,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 14
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: 'microsoft/monaco-editor'
|
|
||||||
path: './monaco-editor'
|
|
||||||
|
|
||||||
- name: Install node modules (1)
|
|
||||||
working-directory: './monaco-editor'
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: (vscode) checkout
|
- name: (vscode) checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -61,6 +52,9 @@ jobs:
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn test-browser --browser chromium
|
run: yarn test-browser --browser chromium
|
||||||
|
|
||||||
|
- name: (vscode) Patch package.json version
|
||||||
|
run: node ./monaco-editor/.github/workflows/nightly/setNightlyVersion.js ./vscode/build/monaco/package.json
|
||||||
|
|
||||||
- name: (vscode) Editor Distro & ESM Bundle
|
- name: (vscode) Editor Distro & ESM Bundle
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn gulp editor-esm-bundle
|
run: yarn gulp editor-esm-bundle
|
||||||
|
|
@ -93,3 +87,55 @@ jobs:
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
working-directory: ./vscode/test/monaco
|
working-directory: ./vscode/test/monaco
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
|
||||||
|
- name: (monaco-editor) checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: 'microsoft/monaco-editor'
|
||||||
|
path: './monaco-editor'
|
||||||
|
|
||||||
|
- name: (monaco-editor) Patch package.json version
|
||||||
|
run: node ./monaco-editor/.github/workflows/nightly/setNightlyVersion.js ./monaco-editor/package.json
|
||||||
|
|
||||||
|
- name: (monaco-editor) Use local monaco-editor-core
|
||||||
|
run: node ./monaco-editor/.github/workflows/nightly/useLocalMonacoEditorCore.js
|
||||||
|
|
||||||
|
- name: (monaco-editor) execute `npm ci` (1)
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: (monaco-editor) execute `npm ci` (2)
|
||||||
|
working-directory: './monaco-editor/webpack-plugin'
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: (monaco-editor) Install OS Dependencies for Playwright
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: sudo npm run playwright-install-deps
|
||||||
|
|
||||||
|
- name: (monaco-editor) Check prettier
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm run prettier-check
|
||||||
|
|
||||||
|
- name: (monaco-editor) Build
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm run release
|
||||||
|
|
||||||
|
- name: (monaco-editor) Run unit tests
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
- name: (monaco-editor) Compile webpack plugin
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm run compile --prefix webpack-plugin
|
||||||
|
|
||||||
|
- name: (monaco-editor) Package using webpack plugin
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm run smoketest --prefix webpack-plugin
|
||||||
|
|
||||||
|
- name: (monaco-editor) Run smoke test
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm run smoketest
|
||||||
|
|
||||||
|
- name: (monaco-editor) Build website
|
||||||
|
working-directory: './monaco-editor'
|
||||||
|
run: npm run build-website
|
||||||
|
|
|
||||||
22
.github/workflows/nightly/setNightlyVersion.js
vendored
Normal file
22
.github/workflows/nightly/setNightlyVersion.js
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
//@ts-check
|
||||||
|
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
if (process.argv.length !== 3) {
|
||||||
|
console.error(`usage: node updateVersion.js <PATH_TO_PACKAGE_JSON_FILE>`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const packagejson = JSON.parse(fs.readFileSync(process.argv[2]).toString());
|
||||||
|
|
||||||
|
const date = new Date();
|
||||||
|
packagejson.version += `-dev.${date.getUTCFullYear()}${String(date.getUTCMonth() + 1).padStart(
|
||||||
|
2,
|
||||||
|
'0'
|
||||||
|
)}${String(date.getUTCDate()).padStart(2, '0')}`;
|
||||||
|
fs.writeFileSync(process.argv[2], JSON.stringify(packagejson, null, '\t') + '\n');
|
||||||
15
.github/workflows/nightly/useLocalMonacoEditorCore.js
vendored
Normal file
15
.github/workflows/nightly/useLocalMonacoEditorCore.js
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
//@ts-check
|
||||||
|
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const REPO_ROOT = path.join(__dirname, '../../../');
|
||||||
|
const packagejsonPath = path.join(REPO_ROOT, 'package.json');
|
||||||
|
const packagejson = JSON.parse(fs.readFileSync(packagejsonPath).toString());
|
||||||
|
packagejson['devDependencies']['monaco-editor-core'] = 'file:../vscode/out-monaco-editor-core';
|
||||||
|
fs.writeFileSync(packagejsonPath, JSON.stringify(packagejson, null, '\t') + '\n');
|
||||||
Loading…
Add table
Add a link
Reference in a new issue