Remove CI workflow since vscode runs it now (e.g. https://github.com/microsoft/vscode/runs/1619014477?check_suite_focus=true)
parent
14c560f898
commit
1cada068d1
@ -1,84 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Smoke Test
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: microsoft/playwright-github-action@v1
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
|
||||
- name: Checkout VS Code
|
||||
run: git clone --depth 1 https://github.com/microsoft/vscode vscode
|
||||
|
||||
- name: Compute VS Code node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
working-directory: ./vscode
|
||||
run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
|
||||
|
||||
- name: Cache VS Code node modules
|
||||
id: cacheNodeModules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "vscode/**/node_modules"
|
||||
key: ${{ runner.os }}-cacheNodeModules-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-cacheNodeModules-
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarnCacheDirPath
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: Cache yarn directory
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
||||
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
||||
|
||||
- name: Execute yarn
|
||||
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
working-directory: ./vscode
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
|
||||
- name: Editor Distro
|
||||
working-directory: ./vscode
|
||||
run: |
|
||||
yarn gulp editor-distro
|
||||
|
||||
- name: NPM Install
|
||||
run: npm install
|
||||
|
||||
- name: Webpack Bundle
|
||||
run: |
|
||||
npm run bundle
|
||||
|
||||
- name: Build Tests
|
||||
run: npm run build-test
|
||||
|
||||
- name: Run Smoke Test
|
||||
run: |
|
||||
npm run ciserver &
|
||||
sleep 10
|
||||
BROWSER=chromium npm run test
|
||||
BROWSER=firefox npm run test
|
||||
BROWSER=webkit npm run test
|
@ -1,25 +0,0 @@
|
||||
import * as monaco from 'monaco-editor-core';
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorkerUrl: function (moduleId, label) {
|
||||
return './editor.worker.bundle.js';
|
||||
}
|
||||
}
|
||||
|
||||
window.instance = monaco.editor.create(document.getElementById('container'), {
|
||||
value: [
|
||||
'from banana import *',
|
||||
'',
|
||||
'class Monkey:',
|
||||
' # Bananas the monkey can eat.',
|
||||
' capacity = 10',
|
||||
' def eat(self, N):',
|
||||
' \'\'\'Make the monkey eat N bananas!\'\'\'',
|
||||
' capacity = capacity - N*banana.size',
|
||||
'',
|
||||
' def feeding_frenzy(self):',
|
||||
' eat(9.25)',
|
||||
' return "Yum yum"',
|
||||
].join('\n'),
|
||||
language: 'python'
|
||||
});
|
@ -1,137 +0,0 @@
|
||||
import * as playwright from 'playwright';
|
||||
import { assert } from 'chai';
|
||||
|
||||
const APP = 'http://127.0.0.1:8080/dist/core.html';
|
||||
|
||||
let browser: playwright.Browser;
|
||||
let page: playwright.Page;
|
||||
|
||||
type BrowserType = "chromium" | "firefox" | "webkit"
|
||||
|
||||
const browserType: BrowserType = process.env.BROWSER as BrowserType || "chromium"
|
||||
|
||||
before(async function () {
|
||||
this.timeout(5 * 1000);
|
||||
console.log(`Starting browser: ${browserType}`)
|
||||
browser = await playwright[browserType].launch({
|
||||
headless: process.argv.includes('--headless'),
|
||||
});
|
||||
});
|
||||
after(async function () {
|
||||
this.timeout(5 * 1000);
|
||||
await browser.close();
|
||||
});
|
||||
beforeEach(async function () {
|
||||
this.timeout(5 * 1000)
|
||||
page = await browser.newPage({
|
||||
viewport: {
|
||||
width: 800,
|
||||
height: 600
|
||||
}
|
||||
});
|
||||
});
|
||||
afterEach(async () => {
|
||||
await page.close();
|
||||
});
|
||||
|
||||
describe('Basic loading', function (): void {
|
||||
this.timeout(20000);
|
||||
|
||||
it('should fail because page has an error', async () => {
|
||||
const pageErrors: any[] = [];
|
||||
page.on('pageerror', (e) => {
|
||||
console.log(e);
|
||||
pageErrors.push(e);
|
||||
});
|
||||
|
||||
page.on('pageerror', (e) => {
|
||||
console.log(e);
|
||||
pageErrors.push(e);
|
||||
});
|
||||
|
||||
await page.goto(APP);
|
||||
this.timeout(20000);
|
||||
|
||||
for (const e of pageErrors) {
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('API Integration Tests', function (): void {
|
||||
this.timeout(20000);
|
||||
|
||||
beforeEach(async () => {
|
||||
await page.goto(APP);
|
||||
});
|
||||
|
||||
it('Default initialization should be error-less', async function (): Promise<any> {
|
||||
assert.equal(await page.evaluate(`monaco.editor.DefaultEndOfLine[1]`), 'LF');
|
||||
});
|
||||
|
||||
it('Focus and Type', async function (): Promise<any> {
|
||||
await page.evaluate(`
|
||||
(function () {
|
||||
instance.focus();
|
||||
instance.trigger('keyboard', 'cursorHome');
|
||||
instance.trigger('keyboard', 'type', {
|
||||
text: 'a'
|
||||
});
|
||||
})()
|
||||
`);
|
||||
assert.equal(await page.evaluate(`instance.getModel().getLineContent(1)`), 'afrom banana import *');
|
||||
});
|
||||
|
||||
it('Type and Undo', async function (): Promise<any> {
|
||||
await page.evaluate(`
|
||||
(function () {
|
||||
instance.focus();
|
||||
instance.trigger('keyboard', 'cursorHome');
|
||||
instance.trigger('keyboard', 'type', {
|
||||
text: 'a'
|
||||
});
|
||||
instance.getModel().undo();
|
||||
})()
|
||||
`);
|
||||
assert.equal(await page.evaluate(`instance.getModel().getLineContent(1)`), 'from banana import *');
|
||||
});
|
||||
|
||||
it('Multi Cursor', async function (): Promise<any> {
|
||||
await page.evaluate(`
|
||||
(function () {
|
||||
instance.focus();
|
||||
instance.trigger('keyboard', 'editor.action.insertCursorBelow');
|
||||
instance.trigger('keyboard', 'editor.action.insertCursorBelow');
|
||||
instance.trigger('keyboard', 'editor.action.insertCursorBelow');
|
||||
instance.trigger('keyboard', 'editor.action.insertCursorBelow');
|
||||
instance.trigger('keyboard', 'editor.action.insertCursorBelow');
|
||||
instance.trigger('keyboard', 'type', {
|
||||
text: '# '
|
||||
});
|
||||
instance.focus();
|
||||
})()
|
||||
`);
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
assert.deepEqual(await page.evaluate(`
|
||||
[
|
||||
instance.getModel().getLineContent(1),
|
||||
instance.getModel().getLineContent(2),
|
||||
instance.getModel().getLineContent(3),
|
||||
instance.getModel().getLineContent(4),
|
||||
instance.getModel().getLineContent(5),
|
||||
instance.getModel().getLineContent(6),
|
||||
instance.getModel().getLineContent(7),
|
||||
]
|
||||
`), [
|
||||
'# from banana import *',
|
||||
'# ',
|
||||
'# class Monkey:',
|
||||
'# # Bananas the monkey can eat.',
|
||||
'# capacity = 10',
|
||||
'# def eat(self, N):',
|
||||
'\t\t\'\'\'Make the monkey eat N bananas!\'\'\''
|
||||
]);
|
||||
});
|
||||
});
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"dom",
|
||||
"es6",
|
||||
],
|
||||
"rootDir": ".",
|
||||
"outDir": "../out-ci/",
|
||||
"types": [
|
||||
"../node_modules/@types/mocha",
|
||||
"../node_modules/@types/node"
|
||||
],
|
||||
"sourceMap": true,
|
||||
"removeComments": true,
|
||||
"pretty": true,
|
||||
"strict": true
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="container" style="width:800px;height:600px;border:1px solid #ccc"></div>
|
||||
|
||||
<script src="./core.bundle.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue