mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-27 02:19:46 +08:00
[client-app] update Travis
Summary:
Also see:
3a33b0ad64
which was hot-pushed to master in order to get Travis building.
We now have two travis files:
1. /.travis.yml
2. /packages/client-app/travis.yml
The first one is alwas in the private repo and runs `npm install && npm
run build-client`. This decrypts our keys and signs, builds, and uploads
to S3.
The second one is designed to live in our yet-to-be public mirror. It will
basically just run `npm install && npm test`.
That way the public one should just about ALWAYS pass (YAY!) except of
course when you break the tests or something in the installer!
Test Plan: Run on new https://travis-ci.com/nylas/nylas-mail-all
Reviewers: jerm, spang, juan
Reviewed By: spang, juan
Differential Revision: https://phab.nylas.com/D3999
This commit is contained in:
parent
87aa1a86ad
commit
7b7318b220
4 changed files with 9 additions and 21 deletions
10
.travis.yml
10
.travis.yml
|
@ -28,9 +28,9 @@ branches:
|
|||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: NODE_VERSION=6.9 CC=gcc-4.8 CXX=g++-4.8
|
||||
env: NODE_VERSION=6.9 CC=gcc-4.8 CXX=g++-4.8 PUBLISH_BUILD=true
|
||||
- os: osx
|
||||
env: NODE_VERSION=6.9 CC=clang CXX=clang++
|
||||
env: NODE_VERSION=6.9 CC=clang CXX=clang++ PUBLISH_BUILD=true
|
||||
|
||||
before_install:
|
||||
- openssl aes-256-cbc
|
||||
|
@ -41,8 +41,8 @@ before_install:
|
|||
-d;
|
||||
- mkdir packages/client-app/build/resources/certs;
|
||||
- tar xvf packages/client-private-plugins/encrypted_certificates/travis/travis-files.tar
|
||||
--directory=packages/client-app/build/resources/certs/;
|
||||
- source packages/client-app/build/resources/certs/set_unix_env.sh;
|
||||
--directory=packages/client-app/build/resources/;
|
||||
- source packages/client-app/build/resources/certs/mac/set_unix_env.sh;
|
||||
|
||||
install:
|
||||
- git clone https://github.com/creationix/nvm.git /tmp/.nvm
|
||||
|
@ -51,7 +51,7 @@ install:
|
|||
- nvm use --delete-prefix $NODE_VERSION
|
||||
|
||||
script:
|
||||
- npm install && npm build-client
|
||||
- npm install && npm run build-client
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"test-client": "packages/client-app/node_modules/.bin/electron packages/client-app --enable-logging --test",
|
||||
"test-client-window": "packages/client-app/node_modules/.bin/electron packages/client-app --enable-logging --test=window",
|
||||
"test-client-junit": "",
|
||||
"build-client": "grunt build --gruntfile=packages/client-app/build/Gruntfile.js --base=./",
|
||||
"build-client": "grunt ci --gruntfile=packages/client-app/build/Gruntfile.js --base=./",
|
||||
"start-cloud": "pm2 stop all; pm2 delete all; pm2 start packages/cloud-core/pm2-dev.yml --no-daemon",
|
||||
"start-cloud-debug": "pm2 stop all; pm2 delete all; pm2 start packages/cloud-core/pm2-debug-cloud-api.yml --no-daemon",
|
||||
"test-cloud": "",
|
||||
|
|
|
@ -69,7 +69,7 @@ module.exports = (grunt) => {
|
|||
};
|
||||
|
||||
getCertData = () => {
|
||||
const certs = path.resolve(path.join(grunt.config('buildDir'), 'resources', 'certs'));
|
||||
const certs = path.resolve(path.join(grunt.config('buildDir'), 'resources', 'certs', 'mac'));
|
||||
const appleCert = path.join(certs, 'AppleWWDRCA.cer');
|
||||
const nylasCert = path.join(certs, 'mac-nylas-n1.cer');
|
||||
const nylasPrivateKey = path.join(certs, 'mac-nylas-n1.p12');
|
||||
|
@ -97,11 +97,10 @@ module.exports = (grunt) => {
|
|||
grunt.log.writeln(`Skipping keychain setup since ${process.platform} is not darwin`);
|
||||
return false
|
||||
}
|
||||
if (!process.env.TRAVIS) {
|
||||
grunt.log.writeln(`Skipping keychain setup since TRAVIS env variable is not set`);
|
||||
if (!shouldPublishBuild()) {
|
||||
grunt.log.writeln(`Skipping keychain setup since PUBLISH_BUILD is false`);
|
||||
return false
|
||||
}
|
||||
if (!shouldPublishBuild()) { return false }
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -24,17 +24,6 @@ module.exports = (grunt) => {
|
|||
grunt.log.writeln("Skipping because PUBLISH_BUILD env is not set");
|
||||
return false;
|
||||
}
|
||||
if (process.env.APPVEYOR) {
|
||||
if (process.env.APPVEYOR_PULL_REQUEST_NUMBER) {
|
||||
grunt.log.writeln("Skipping because this is a pull request");
|
||||
return false;
|
||||
}
|
||||
} else if (process.env.TRAVIS) {
|
||||
if (process.env.TRAVIS_PULL_REQUEST !== "false") {
|
||||
grunt.log.writeln("Skipping because TRAVIS_PULL_REQUEST env doesn't equal 'false'");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue