Add support for skipping `monaco-editor-core`
parent
7e010114fe
commit
f1fc190711
|
@ -32,72 +32,81 @@ jobs:
|
||||||
node ./monaco-editor/.github/workflows/publish/computeState.js "${{github.event_name}}" "${{github.event.inputs.nightly}}"
|
node ./monaco-editor/.github/workflows/publish/computeState.js "${{github.event_name}}" "${{github.event.inputs.nightly}}"
|
||||||
# outputs: version, vscode_branch, skip_monaco_editor_core, skip_monaco_editor
|
# outputs: version, vscode_branch, skip_monaco_editor_core, skip_monaco_editor
|
||||||
|
|
||||||
- name: Print state
|
# - name: Print state
|
||||||
run: |
|
# run: |
|
||||||
echo ${{ steps.state.outputs.vscode_branch }}
|
# echo ${{ steps.state.outputs.vscode_branch }}
|
||||||
|
|
||||||
- name: (vscode) checkout
|
- name: (vscode) checkout
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode'
|
repository: 'microsoft/vscode'
|
||||||
ref: ${{ steps.state.outputs.vscode_branch }}
|
ref: ${{ steps.state.outputs.vscode_branch }}
|
||||||
path: './vscode'
|
path: './vscode'
|
||||||
|
|
||||||
# TODO
|
|
||||||
- name: Early stop
|
|
||||||
run: exit 1
|
|
||||||
|
|
||||||
- name: (vscode-loc) checkout
|
- name: (vscode-loc) checkout
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-loc'
|
repository: 'microsoft/vscode-loc'
|
||||||
path: './vscode-loc'
|
path: './vscode-loc'
|
||||||
|
|
||||||
- name: (vscode) execute `yarn`
|
- name: (vscode) execute `yarn`
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn --frozen-lockfile --network-timeout 180000
|
run: yarn --frozen-lockfile --network-timeout 180000
|
||||||
|
|
||||||
- name: (vscode) Run Hygiene Checks
|
- name: (vscode) Run Hygiene Checks
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn gulp hygiene
|
run: yarn gulp hygiene
|
||||||
|
|
||||||
- name: (vscode) Run Valid Layers Checks
|
- name: (vscode) Run Valid Layers Checks
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn valid-layers-check
|
run: yarn valid-layers-check
|
||||||
|
|
||||||
- name: (vscode) Compile /build/
|
- name: (vscode) Compile /build/
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn --cwd build compile
|
run: yarn --cwd build compile
|
||||||
|
|
||||||
- name: (vscode) Run eslint
|
- name: (vscode) Run eslint
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn eslint
|
run: yarn eslint
|
||||||
|
|
||||||
- name: (vscode) Run Monaco Editor Checks
|
- name: (vscode) Run Monaco Editor Checks
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn monaco-compile-check
|
run: yarn monaco-compile-check
|
||||||
|
|
||||||
- name: (vscode) Compile
|
- name: (vscode) Compile
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn --max_old_space_size=4095 compile
|
run: yarn --max_old_space_size=4095 compile
|
||||||
|
|
||||||
- name: (vscode) Run Unit Tests (Browser)
|
- name: (vscode) Run Unit Tests (Browser)
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn test-browser --browser chromium
|
run: yarn test-browser --browser chromium
|
||||||
|
|
||||||
- name: (vscode) Patch package.json version
|
- name: (vscode) Patch package.json version
|
||||||
if: ${{ github.event_name == 'schedule' || github.event.inputs.nightly == 'true' }}
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
run: node ./monaco-editor/.github/workflows/publish/setNightlyVersion.js ./vscode/build/monaco/package.json
|
run: node ./monaco-editor/.github/workflows/publish/setVersion.js ./vscode/build/monaco/package.json ${{ steps.state.outputs.version }}
|
||||||
|
|
||||||
- name: (vscode) Editor Distro
|
- name: (vscode) Editor Distro
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: yarn gulp editor-distro
|
run: yarn gulp editor-distro
|
||||||
|
|
||||||
- name: (vscode) Typings validation prep
|
- name: (vscode) Typings validation prep
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode'
|
working-directory: './vscode'
|
||||||
run: mkdir typings-test
|
run: mkdir typings-test
|
||||||
|
|
||||||
- name: (vscode) Typings validation
|
- name: (vscode) Typings validation
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: ./vscode/typings-test
|
working-directory: ./vscode/typings-test
|
||||||
run: |
|
run: |
|
||||||
yarn init -yp
|
yarn init -yp
|
||||||
|
@ -106,35 +115,45 @@ jobs:
|
||||||
../node_modules/.bin/tsc --noEmit
|
../node_modules/.bin/tsc --noEmit
|
||||||
|
|
||||||
- name: (vscode) Webpack Editor
|
- name: (vscode) Webpack Editor
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: ./vscode/test/monaco
|
working-directory: ./vscode/test/monaco
|
||||||
run: yarn run bundle
|
run: yarn run bundle
|
||||||
|
|
||||||
- name: (vscode) Compile Editor Tests
|
- name: (vscode) Compile Editor Tests
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: ./vscode/test/monaco
|
working-directory: ./vscode/test/monaco
|
||||||
run: yarn run compile
|
run: yarn run compile
|
||||||
|
|
||||||
- name: (vscode) Download Playwright
|
- name: (vscode) Download Playwright
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: ./vscode
|
working-directory: ./vscode
|
||||||
run: yarn playwright-install
|
run: yarn playwright-install
|
||||||
|
|
||||||
- name: (vscode) Run Editor Tests
|
- name: (vscode) Run Editor Tests
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
working-directory: ./vscode/test/monaco
|
working-directory: ./vscode/test/monaco
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
|
||||||
- name: Set `npm` config
|
- name: Set `npm` config
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Publish `monaco-editor-core`
|
- name: Publish `monaco-editor-core`
|
||||||
if: ${{ github.event_name == 'schedule' || github.event.inputs.nightly == 'true' }}
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
working-directory: './vscode/out-monaco-editor-core'
|
working-directory: './vscode/out-monaco-editor-core'
|
||||||
run: npm publish --tag next
|
run: npm publish --tag next
|
||||||
|
|
||||||
- name: Delete `npm` config
|
- name: Delete `npm` config
|
||||||
|
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||||
run: npm config delete //registry.npmjs.org/:_authToken
|
run: npm config delete //registry.npmjs.org/:_authToken
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
- name: Early stop
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
- name: (monaco-editor) Patch package.json version
|
- name: (monaco-editor) Patch package.json version
|
||||||
if: ${{ github.event_name == 'schedule' || github.event.inputs.nightly == 'true' }}
|
if: ${{ github.event_name == 'schedule' || github.event.inputs.nightly == 'true' }}
|
||||||
run: node ./monaco-editor/.github/workflows/publish/setNightlyVersion.js ./monaco-editor/package.json
|
run: node ./monaco-editor/.github/workflows/publish/setNightlyVersion.js ./monaco-editor/package.json
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* 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 !== 4) {
|
||||||
|
console.error(`usage: node setVersion.js <PATH_TO_PACKAGE_JSON_FILE> <VERSION>`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const packagejson = JSON.parse(fs.readFileSync(process.argv[2]).toString());
|
||||||
|
packagejson.version = process.argv[3];
|
||||||
|
fs.writeFileSync(process.argv[2], JSON.stringify(packagejson, null, '\t') + '\n');
|
Loading…
Reference in New Issue