This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
176 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
jobs: | ||
- job: Linux | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
variables: | ||
display: ":99" | ||
steps: | ||
- bash: | | ||
curl -s -L "https://atom.io/download/deb?channel=dev" \ | ||
-H 'Accept: application/octet-stream' \ | ||
-o 'atom-amd64.deb' | ||
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 | ||
sudo apt-get update && sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev | ||
dpkg-deb -x atom-amd64.deb /tmp/atom | ||
displayName: install Atom | ||
- bash: /tmp/atom/usr/share/atom-dev/resources/app/apm/bin/apm ci | ||
displayName: install dependencies | ||
- bash: /tmp/atom/usr/bin/atom-dev --test test/ | ||
displayName: run tests | ||
continueOnError: true | ||
env: | ||
TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml | ||
FORCE_COLOR: 0 | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFormat: JUnit | ||
testResultsFiles: $(Agent.HomeDirectory)/test-results.xml | ||
testRunTitle: Linux | ||
|
||
- job: MacOS | ||
pool: | ||
vmImage: macos-10.13 | ||
steps: | ||
- bash: | | ||
set -x | ||
curl -s -L "https://atom.io/download/mac?channel=dev" \ | ||
-H 'Accept: application/octet-stream' \ | ||
-o "atom.zip" | ||
mkdir -p /tmp/atom | ||
unzip -q atom.zip -d /tmp/atom | ||
displayName: install Atom | ||
- bash: /tmp/atom/Atom\ Dev.app/Contents/Resources/app/apm/bin/apm ci | ||
displayName: install dependencies | ||
- bash: /tmp/atom/Atom\ Dev.app/Contents/Resources/app/atom.sh --test test/ | ||
displayName: run tests | ||
continueOnError: true | ||
env: | ||
TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml | ||
FORCE_COLOR: 0 | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFormat: JUnit | ||
testResultsFiles: $(Agent.HomeDirectory)/test-results.xml | ||
testRunTitle: MacOS | ||
|
||
- job: Windows | ||
pool: | ||
vmImage: vs2015-win2012r2 | ||
steps: | ||
- powershell: | | ||
Set-StrictMode -Version Latest | ||
$script:ATOMROOT = "$env:AGENT_HOMEDIRECTORY/atom" | ||
Write-Host "Downloading latest Atom release" | ||
$source = "https://atom.io/download/windows_zip?channel=dev" | ||
$destination = "atom.zip" | ||
(New-Object System.Net.WebClient).DownloadFile($source, $destination) | ||
Expand-Archive -Path "atom.zip" -DestinationPath $script:ATOMROOT | ||
displayName: install Atom | ||
- powershell: | | ||
Set-StrictMode -Version Latest | ||
$script:ATOMROOT = "$env:AGENT_HOMEDIRECTORY/atom" | ||
$script:APM_SCRIPT_PATH = "$script:ATOMROOT\Atom Dev\resources\app\apm\bin\apm.cmd" | ||
Write-Host "Installing package dependencies" | ||
& "$script:APM_SCRIPT_PATH" ci | ||
if ($LASTEXITCODE -ne 0) { | ||
Write-Host "Dependency installation failed" | ||
$host.SetShouldExit($LASTEXITCODE) | ||
exit | ||
} | ||
displayName: install dependencies | ||
- powershell: | | ||
Set-StrictMode -Version Latest | ||
$script:ATOMROOT = "$env:AGENT_HOMEDIRECTORY/atom" | ||
$script:ATOM_SCRIPT_PATH = "$script:ATOMROOT\Atom Dev\resources\cli\atom.cmd" | ||
$env:ELECTRON_NO_ATTACH_CONSOLE = "true" | ||
[Environment]::SetEnvironmentVariable("ELECTRON_NO_ATTACH_CONSOLE", "true", "User") | ||
$env:ELECTRON_ENABLE_LOGGING = "YES" | ||
[Environment]::SetEnvironmentVariable("ELECTRON_ENABLE_LOGGING", "YES", "User") | ||
Write-Host "Running tests" | ||
& "$script:ATOM_SCRIPT_PATH" --test test 2>&1 | %{ "$_" } | ||
if ($LASTEXITCODE -ne 0) { | ||
Write-Host "Specs Failed" | ||
$host.SetShouldExit($LASTEXITCODE) | ||
exit | ||
} | ||
displayName: run tests | ||
continueOnError: true | ||
env: | ||
TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)/test-results.xml | ||
FORCE_COLOR: 0 | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFormat: JUnit | ||
testResultsFiles: $(Agent.HomeDirectory)/test-results.xml | ||
testRunTitle: Windows |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters