mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add Azure Pipelines (#3140)
* Adding ci files * Single pipeline * Add test reporting * Try adding mocha-junit-reporter * More complete test reporting * Cleaning up * Trying to find location of test file * Added searching logic to wrong file * Trying different method of getting test results * Add reporter option * Adding alternate way of getting mac os * Get rid of bad comments
This commit is contained in:
committed by
Karl Burtram
parent
f7879bdbf9
commit
3b68c1eb69
38
azure-pipelines-linux-mac.yml
Normal file
38
azure-pipelines-linux-mac.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '8.x'
|
||||||
|
displayName: 'Install Node.js'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
git submodule update --init --recursive
|
||||||
|
nvm install 8.9.1
|
||||||
|
nvm use 8.9.1
|
||||||
|
npm i -g yarn
|
||||||
|
displayName: 'preinstall'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0
|
||||||
|
sh -e /etc/init.d/xvfb start
|
||||||
|
sleep 3
|
||||||
|
displayName: 'Linux preinstall'
|
||||||
|
condition: eq(variables['Agent.OS'], 'Linux')
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn
|
||||||
|
displayName: 'Install'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
node_modules/.bin/gulp electron --silent
|
||||||
|
node_modules/.bin/gulp compile --silent --max_old_space_size=4096
|
||||||
|
node_modules/.bin/gulp optimize-vscode --silent --max_old_space_size=4096
|
||||||
|
displayName: 'Scripts'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
./scripts/test.sh --reporter mocha-junit-reporter
|
||||||
|
displayName: 'Tests'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '**/test-results.xml'
|
||||||
|
condition: succeededOrFailed()
|
||||||
27
azure-pipelines-windows.yml
Normal file
27
azure-pipelines-windows.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '8.9'
|
||||||
|
displayName: 'Install Node.js'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn
|
||||||
|
displayName: 'Yarn Install'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
.\node_modules\.bin\gulp electron
|
||||||
|
displayName: 'Electron'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
npm run compile
|
||||||
|
displayName: 'Compile'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
.\scripts\test.bat
|
||||||
|
.\scripts\test-integration.bat
|
||||||
|
displayName: 'Test'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '**/test-results.xml'
|
||||||
|
condition: succeededOrFailed()
|
||||||
29
azure-pipelines.yml
Normal file
29
azure-pipelines.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
trigger:
|
||||||
|
- master
|
||||||
|
- releases/*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# All tasks on Windows
|
||||||
|
- job: build_all_windows
|
||||||
|
displayName: Build all tasks (Windows)
|
||||||
|
pool:
|
||||||
|
vmImage: vs2017-win2016
|
||||||
|
steps:
|
||||||
|
- template: azure-pipelines-windows.yml
|
||||||
|
|
||||||
|
# All tasks on Linux
|
||||||
|
- job: build_all_linux
|
||||||
|
displayName: Build all tasks (Linux)
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu 16.04'
|
||||||
|
steps:
|
||||||
|
- template: azure-pipelines-linux-mac.yml
|
||||||
|
|
||||||
|
# All tasks on macOS
|
||||||
|
- job: build_all_darwin
|
||||||
|
displayName: Build all tasks (macOS)
|
||||||
|
pool:
|
||||||
|
vmImage: macos-10.13
|
||||||
|
steps:
|
||||||
|
- template: azure-pipelines-linux-mac.yml
|
||||||
@@ -12,12 +12,18 @@ set CODE=".build\electron\%NAMESHORT%"
|
|||||||
|
|
||||||
rem TFS Builds
|
rem TFS Builds
|
||||||
if not "%BUILD_BUILDID%" == "" (
|
if not "%BUILD_BUILDID%" == "" (
|
||||||
%CODE% .\node_modules\mocha\bin\_mocha %*
|
if not "%ADD_REPORTER%" == "" (
|
||||||
|
%CODE% .\node_modules\mocha\bin\_mocha --reporter mocha-junit-reporter %*
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%ADD_REPORTER%" == "" (
|
||||||
|
%CODE% .\node_modules\mocha\bin\_mocha %*
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
rem Otherwise
|
rem Otherwise
|
||||||
if "%BUILD_BUILDID%" == "" (
|
if "%BUILD_BUILDID%" == "" (
|
||||||
%CODE% .\node_modules\mocha\bin\_mocha --reporter dot %*
|
%CODE% .\node_modules\mocha\bin\_mocha --reporter mocha-junit-reporter %*
|
||||||
)
|
)
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
||||||
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
|
||||||
ROOT=$(dirname $(dirname $(realpath "$0")))
|
ROOT=$(dirname $(dirname $(realpath "$0")))
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ fi
|
|||||||
|
|
||||||
cd $ROOT
|
cd $ROOT
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
||||||
NAME=`node -p "require('./product.json').nameLong"`
|
NAME=`node -p "require('./product.json').nameLong"`
|
||||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
||||||
else
|
else
|
||||||
@@ -30,7 +30,7 @@ node build/lib/electron.js || ./node_modules/.bin/gulp electron
|
|||||||
|
|
||||||
# Unit Tests
|
# Unit Tests
|
||||||
export ELECTRON_RUN_AS_NODE=1
|
export ELECTRON_RUN_AS_NODE=1
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
||||||
cd $ROOT ; ulimit -n 4096 ; \
|
cd $ROOT ; ulimit -n 4096 ; \
|
||||||
"$CODE" \
|
"$CODE" \
|
||||||
node_modules/mocha/bin/_mocha "$@"
|
node_modules/mocha/bin/_mocha "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user