This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup prebuildify and Electron tests
- Loading branch information
Showing
4 changed files
with
109 additions
and
30 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 |
---|---|---|
@@ -1,18 +1,56 @@ | ||
sudo: false | ||
|
||
language: node_js | ||
|
||
jobs: | ||
include: | ||
- os: linux | ||
node_js: 8 | ||
env: [TEST=1] | ||
- os: linux | ||
node_js: 10 | ||
env: [TEST=1] | ||
- os: linux | ||
node_js: node | ||
env: [TEST=1, TEST_ELECTRON=1, BUILD_CMD=prebuild, BUILD_GROUP=linux-x64] | ||
addons: | ||
apt: | ||
packages: | ||
- xvfb | ||
before_script: | ||
- export DISPLAY=':99.0' | ||
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
- os: osx | ||
node_js: 8 | ||
env: [TEST=1] | ||
- os: osx | ||
node_js: 10 | ||
env: [TEST=1] | ||
- os: osx | ||
node_js: node | ||
env: [TEST=1, TEST_ELECTRON=1, BUILD_CMD=prebuild, BUILD_GROUP=darwin-x64] | ||
|
||
before_install: | ||
- export JOBS=max | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export JOBS=4; fi | ||
|
||
os: | ||
- osx | ||
- linux | ||
script: | ||
- if [[ ! -z "$TEST" ]]; then npm run test; fi | ||
- if [[ ! -z "$TEST_ELECTRON" ]]; then npm run test-electron; fi | ||
|
||
after_success: | ||
- if [[ ! -z "$TEST" ]]; then npm run coverage; fi | ||
|
||
node_js: | ||
- 6 | ||
- 8 | ||
- 10 | ||
before_deploy: | ||
- export ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$BUILD_GROUP.tar.gz" | ||
- npm run $BUILD_CMD | ||
- file prebuilds/*/* | ||
- tar -zcvf "$ARCHIVE_NAME" -C prebuilds . | ||
|
||
after_success: npm run coverage | ||
deploy: | ||
provider: releases | ||
draft: false | ||
api_key: "$PREBUILD_TOKEN" | ||
file: "$ARCHIVE_NAME" | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
condition: "! -z $BUILD_CMD" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
version: "{build}" | ||
build: off | ||
skip_tags: true | ||
build: false | ||
skip_branch_with_pr: true | ||
|
||
environment: | ||
matrix: | ||
- nodejs_version: "6" | ||
- nodejs_version: "8" | ||
- nodejs_version: "10" | ||
- nodejs_version: "Current" | ||
|
||
configuration: Release | ||
platform: | ||
- x64 | ||
|
||
install: | ||
- SET PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;%PATH% | ||
- ps: Install-Product node $env:nodejs_version $env:platform | ||
- set PATH=%APPDATA%\npm;%APPVEYOR_BUILD_FOLDER%\node_modules\.bin;%PATH% | ||
- SET PATH=%APPDATA%\npm;%APPVEYOR_BUILD_FOLDER%\node_modules\.bin;%PATH% | ||
- npm i | ||
|
||
test_script: | ||
- node --version | ||
- npm --version | ||
- npm test | ||
- ps: if ($env:nodejs_version -eq "Current") { npm run test-electron } | ||
|
||
before_deploy: | ||
- SET ARCHIVE_NAME=%APPVEYOR_REPO_TAG_NAME%-win32-%PLATFORM%.tar.gz | ||
- npm run prebuild | ||
- tar -zcvf "%ARCHIVE_NAME%" -C prebuilds . | ||
- appveyor PushArtifact %ARCHIVE_NAME% | ||
|
||
deploy: | ||
- provider: GitHub | ||
artifact: $(ARCHIVE_NAME) | ||
auth_token: | ||
secure: AjmYV2zeogfen7F6tXvR9PO1zynJVF/jhMCExQ9RMtqEHDMH8Frclym3GniZkEB0 | ||
draft: false | ||
on: | ||
appveyor_repo_tag: true | ||
nodejs_version: "Current" |
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