-
Notifications
You must be signed in to change notification settings - Fork 3
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
Dan Ziv
committed
Oct 14, 2018
1 parent
fe29d51
commit 603a547
Showing
4 changed files
with
15 additions
and
66 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,79 +1,24 @@ | ||
conditions: v1 | ||
sudo: required | ||
dist: trusty | ||
language: node_js | ||
node_js: | ||
- "node" | ||
|
||
addons: | ||
chrome: stable | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- node_modules | ||
|
||
before_install: | ||
- export CHROME_BIN=/usr/bin/google-chrome | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- chmod +x ./scripts/travis.sh | ||
|
||
script: ./scripts/travis.sh | ||
|
||
stages: | ||
- Tests | ||
- Release canary | ||
- Release | ||
- sudo apt-get update | ||
- sudo apt-get install -y libappindicator1 fonts-liberation | ||
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
- sudo dpkg -i google-chrome*.deb | ||
|
||
jobs: | ||
fast_finish: true | ||
include: | ||
# https://docs.travis-ci.com/user/build-stages/deploy-github-releases/ | ||
- stage: Release | ||
name: "Releasing a new version" | ||
if: tag IS present | ||
env: TRAVIS_MODE=release | ||
deploy: | ||
- provider: releases | ||
api_key: | ||
secure: $GH_TOKEN | ||
file_glob: true | ||
file: dist/* | ||
prerelease: true | ||
skip_cleanup: true | ||
on: | ||
branch: master | ||
tags: true | ||
- provider: npm | ||
api_key: $NPM_TOKEN | ||
email: $NPM_EMAIL | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
branch: master | ||
# publish canary package if on master | ||
- stage: Release canary | ||
if: (branch = master) AND (type != pull_request) AND commit_message !~ /^chore\(release\)/ | ||
env: TRAVIS_MODE=releaseCanary | ||
deploy: | ||
provider: npm | ||
api_key: $NPM_TOKEN | ||
email: $NPM_EMAIL | ||
skip_cleanup: true | ||
tag: canary | ||
on: | ||
tags: false | ||
branch: master | ||
# Required tests | ||
- stage: Tests | ||
if: (branch = master) OR (tag IS present) OR (type = pull_request) | ||
name: "Running lint" | ||
env: TRAVIS_MODE=lint | ||
- stage: Tests | ||
if: (branch = master) OR (tag IS present) OR (type = pull_request) | ||
name: "Running Flow type check" | ||
env: TRAVIS_MODE=flow | ||
- stage: Tests | ||
if: (branch = master) OR (tag IS present) OR (type = pull_request) | ||
name: "Running unit tests" | ||
env: TRAVIS_MODE=unitTests | ||
script: | ||
- npm run eslint | ||
- npm run flow | ||
- npm run test |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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