Also run monaco-editor checks in nightly

This commit is contained in:
Alex Dima 2021-11-23 09:31:51 +01:00
parent 2379aa505f
commit 2fb82fb3ad
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
4 changed files with 94 additions and 11 deletions

View file

@ -21,11 +21,11 @@ jobs:
key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-cacheNodeModules-
- name: Install node modules (1)
- name: execute `npm ci` (1)
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm ci
- name: Install node modules (2)
- name: execute `npm ci` (2)
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: npm ci --prefix webpack-plugin

View file

@ -14,15 +14,6 @@ jobs:
with:
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
uses: actions/checkout@v2
with:
@ -61,6 +52,9 @@ jobs:
working-directory: './vscode'
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
working-directory: './vscode'
run: yarn gulp editor-esm-bundle
@ -93,3 +87,55 @@ jobs:
timeout-minutes: 5
working-directory: ./vscode/test/monaco
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

View 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');

View 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');