Turn back on Linux CI test validation (#14241)

* Turn on Linux CI test validation

* Add checks around a code block raising exceptions in unit tests

* Bump node version to 12

* Add check around classList add
This commit is contained in:
Karl Burtram
2021-02-11 18:59:40 -08:00
committed by GitHub
parent 756454efa9
commit 7739f25f7f
3 changed files with 70 additions and 55 deletions

View File

@@ -11,57 +11,57 @@ on:
- release/* - release/*
jobs: jobs:
# linux: linux:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# env: env:
# CHILD_CONCURRENCY: "1" CHILD_CONCURRENCY: "1"
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps: steps:
# - uses: actions/checkout@v2.2.0 - uses: actions/checkout@v2.2.0
# # TODO: rename azure-pipelines/linux/xvfb.init to github-actions # TODO: rename azure-pipelines/linux/xvfb.init to github-actions
# - run: | - run: |
# sudo apt-get update sudo apt-get update
# sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libkrb5-dev # {{SQL CARBON EDIT}} add kerberos dep sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libkrb5-dev # {{SQL CARBON EDIT}} add kerberos dep
# sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
# sudo chmod +x /etc/init.d/xvfb sudo chmod +x /etc/init.d/xvfb
# sudo update-rc.d xvfb defaults sudo update-rc.d xvfb defaults
# sudo service xvfb start sudo service xvfb start
# name: Setup Build Environment name: Setup Build Environment
# - uses: actions/setup-node@v1 - uses: actions/setup-node@v1
# with: with:
# node-version: 10 node-version: 12
# # TODO: cache node modules # TODO: cache node modules
# # Increase timeout to get around latency issues when fetching certain packages # Increase timeout to get around latency issues when fetching certain packages
# - run: | - run: |
# yarn config set network-timeout 300000 yarn config set network-timeout 300000
# yarn --frozen-lockfile yarn --frozen-lockfile
# name: Install Dependencies name: Install Dependencies
# - run: yarn electron x64 - run: yarn electron x64
# name: Download Electron name: Download Electron
# - run: yarn gulp hygiene - run: yarn gulp hygiene
# name: Run Hygiene Checks name: Run Hygiene Checks
# - run: yarn strict-vscode # {{SQL CARBON EDIT}} add step - run: yarn strict-vscode # {{SQL CARBON EDIT}} add step
# name: Run Strict Compile Options name: Run Strict Compile Options
# # - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step # - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step
# # name: Run Monaco Editor Checks # name: Run Monaco Editor Checks
# - run: yarn valid-layers-check - run: yarn valid-layers-check
# name: Run Valid Layers Checks name: Run Valid Layers Checks
# - run: yarn compile - run: yarn compile
# name: Compile Sources name: Compile Sources
# # - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step # - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step
# # name: Download Built-in Extensions # name: Download Built-in Extensions
# - run: DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests" --coverage --runGlob "**/sql/**/*.test.js" - run: DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests" --coverage --runGlob "**/sql/**/*.test.js"
# name: Run Unit Tests (Electron) name: Run Unit Tests (Electron)
# - run: DISPLAY=:10 ./scripts/test-extensions-unit.sh - run: DISPLAY=:10 ./scripts/test-extensions-unit.sh
# name: Run Extension Unit Tests (Electron) name: Run Extension Unit Tests (Electron)
# # {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly # {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly
# - run: node test/combineCoverage - run: node test/combineCoverage
# name: Combine code coverage files name: Combine code coverage files
# - name: Upload Code Coverage - name: Upload Code Coverage
# uses: coverallsapp/github-action@v1.1.1 uses: coverallsapp/github-action@v1.1.1
# with: with:
# github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: "test/coverage/lcov.info" path-to-lcov: "test/coverage/lcov.info"
# Fails with cryptic error (e.g. https://github.com/microsoft/vscode/pull/90292/checks?check_run_id=433681926#step:13:9) # Fails with cryptic error (e.g. https://github.com/microsoft/vscode/pull/90292/checks?check_run_id=433681926#step:13:9)
# - run: DISPLAY=:10 yarn test-browser --browser chromium # - run: DISPLAY=:10 yarn test-browser --browser chromium
@@ -78,7 +78,7 @@ jobs:
- uses: actions/checkout@v2.2.0 - uses: actions/checkout@v2.2.0
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
node-version: 10 node-version: 12
- uses: actions/setup-python@v1 - uses: actions/setup-python@v1
with: with:
python-version: "2.x" python-version: "2.x"
@@ -117,7 +117,7 @@ jobs:
- uses: actions/checkout@v2.2.0 - uses: actions/checkout@v2.2.0
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
node-version: 10 node-version: 12
# Increase timeout to get around latency issues when fetching certain packages # Increase timeout to get around latency issues when fetching certain packages
- run: | - run: |
yarn config set network-timeout 300000 yarn config set network-timeout 300000

View File

@@ -313,9 +313,21 @@ export class ActionViewItem extends BaseActionViewItem {
if (this.label) { if (this.label) {
this.label.classList.add('codicon'); this.label.classList.add('codicon');
if (this.cssClass) { if (this.cssClass) {
// {{SQL CARBON EDIT}} - avoid exception if class contains empty elements
let classList = this.cssClass.split(' ');
let containsEmpty = false;
if (classList && classList.length > 0) {
for (let i = 0; i < classList.length; ++i) {
if (classList[i] === undefined || classList[i] === '') {
containsEmpty = true;
}
}
if (!containsEmpty) {
this.label.classList.add(...this.cssClass.split(' ')); this.label.classList.add(...this.cssClass.split(' '));
} }
} }
}
}
this.updateEnabled(); this.updateEnabled();
} else { } else {

View File

@@ -345,7 +345,10 @@ class WelcomePage extends Disposable {
workspaces = workspaces.filter(recent => !this.contextService.isCurrentWorkspace(isRecentWorkspace(recent) ? recent.workspace : recent.folderUri)); workspaces = workspaces.filter(recent => !this.contextService.isCurrentWorkspace(isRecentWorkspace(recent) ? recent.workspace : recent.folderUri));
if (!workspaces.length) { if (!workspaces.length) {
const recent = container.querySelector('.welcomePage') as HTMLElement; const recent = container.querySelector('.welcomePage') as HTMLElement;
// {{SQL CARBON EDIT}} - avoid unit test null ref
if (recent && recent.classList) {
recent.classList.add('emptyRecent'); recent.classList.add('emptyRecent');
}
return; return;
} }
const ul = container.querySelector('.recent ul'); const ul = container.querySelector('.recent ul');