Skip to content

Commit

Permalink
Add Travis deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgraham committed Feb 17, 2017
1 parent 787ad20 commit 5623e8b
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
language: c
sudo: required
node:
matrix:
include:
# - os: osx # Uncomment this when OSX becomes less flaky
- os: linux
env: CC=clang CXX=clang++ npm_config_clang=1
compiler: clang
node_js:
- '7'
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends
-y icnsutils graphicsmagick xz-utils; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export RELEASE_FILE_PATH='release/*.AppImage'; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export RELEASE_FILE_PATH='release/mac/*.app'; fi
- echo "Deploying to $RELEASE_FILE_PATH"
addons:
apt:
packages:
- xvfb
before_script:
- node --version
- npm install
- npm install -g electron
- node --version
- npm run package || true # TODO: Remove this once electron-builder has a new version that includes dpgraham's PR (https://github.com/electron-userland/electron-builder/pull/1274)
cache:
directories:
- node_modules
- "$HOME/.electron"
- "$HOME/.cache"
script:
- npm run e2e
install:
- nvm install 7
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
dist: trusty
deploy:
provider: releases
skip_cleanup: true
file_glob: true
file: "${RELEASE_FILE_PATH}"
api_key:
secure: oEQR3OIKVftqOwPOagzN7/RPw4fJjK64gbg4ziq9TUcsMSKHxI5kpoWLJPnahyMtO7Vkj6ee7Xy3QJXPJ1fl0ZX7Mo8P3t+bl3bKMfQBv1ld6iBMgrNxnB0ABd9084n4pfYAbV7N5g5ZkX9oV4ExcJWPKD2eSp3AaiyguPit3JpGwlSOsJByg1vCmB9yDgfo5dih9gEuId+tF/1ylpATqA+3rijtRdNOmoTTNXxmN+o/Hu8GzqP8LmlucGUqOKIyhM46/6ypWVtTWpmu5KAx3qXkqTed/S4I+VZ1EC7EigXPX2MD09w2/d44udGWJGAHVSGDNUTH3Kex6QT/2VPJ72CKUm7RV/xrKudx+6MhprbYkcsi0HdcbpMz0c3L30ps6src3S1zBQHC69RZrL/5WgFdEm0uG/i//SaYVuAD1dO7+0lBxnPqQrft3sdj6qOkAP1w9cUbNeYTihojyzTlgbrL1XsGji3M2Ir0DF4AxRdFI2vnyEmrZDtJKynGYBlfMFFc9RGTrFGSq1hP03/E7Hhg+BOnMDrfkPM2TXlj/xdhxeRzC9qtUwVyulEQrsdHV0ALzwC4eXR/w0xygABqhTM8GxodPQmBK1W9sP9DZy0YiEzWwMPKsWYkSDyqXUcfkX+sp37d0lTuWpDjWzyZ3GYrT+6STVTnyU5NZ5FT6VE=
on:
repo: dpgraham/appium-desktop
tags: true
29 changes: 29 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
environment:
nodejs_version: "6"

install:
- ps: Install-Product node $env:nodejs_version
- npm install

test_script:
- node --version
- npm --version
- npm run package
#- npm run e2e # TODO: How to make script windows compatible?

build: off

artifacts:
- path: 'release\Appium*.exe'

# TODO: How to deploy AppVeyor without overwriting tag
#deploy:
#description: 'Windows release'
#provider: GitHub
#force_update: true
#auth_token:
#secure: KqmUhAUI3Hhu13HH8pCYpleGyFrTpj+CxB4+yrvUMgPqiYoGamgD9x0DV8lOkGfR
#artifact: /Appium-Setup-*.exe/
#on:
#branch: master
#appveyor_repo_tag: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"appId": "io.appium.desktop",
"category": "public.app-category.tools",
"asar": false,
"artifactName": "Appium",
"directories": {
"output": "release"
},
Expand Down Expand Up @@ -75,7 +76,6 @@
},
"linux": {
"target": [
"deb",
"AppImage"
]
}
Expand Down
13 changes: 11 additions & 2 deletions test/e2e/main-e2e.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
var Application = require('spectron').Application;
var assert = require('assert');
var os = require('os');
var platform = os.platform();

describe('application launch', function () {
this.timeout(30000);
this.timeout(process.env.TRAVIS ? 10 * 60 * 1000 : 30 * 1000);

var app = __dirname + '/../../release/mac/Appium.app/Contents/MacOS/Appium';
var app = __dirname;
if (platform === 'linux') {
app += '/../../release/linux-unpacked/appium-desktop';
} else if (platform === '') {
app += '/../../release/mac/Appium.app/Contents/MacOS/Appium';
} else if (platform === 'win32') {
app += '../../release/win-ia32-unpacked/Appium.exe';
}

beforeEach(function () {
this.app = new Application({
Expand Down

0 comments on commit 5623e8b

Please sign in to comment.