Created
January 17, 2017 01:43
-
-
Save acburdine/61f4f91bacf6554fccdaa394fd14ebbd to your computer and use it in GitHub Desktop.
Adding Yarn to Travis CI
This file contains hidden or 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
addons: | |
apt: | |
sources: | |
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main' | |
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg' | |
packages: | |
- yarn | |
install: | |
- yarn |
More recent update for those who find this - Here's how to install the latest version of yarn into Travis's trusty
docker container:
language: node_js
node_js: lts/carbon
sudo: false
dist: trusty
cache:
yarn: true
env:
global:
- YARN_VERSION=1.7.0
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH=$HOME/.yarn/bin:$PATH
install:
- yarn
if you want a specific version of yarn, just put it into the YARN_VERSION
variable... Enjoy!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update to those that find this - it turns out Yarn (a slightly older version) comes pre-installed on
trusty
builds on Travis. For that you'll have tonpm i -g yarn
unfortunately, installing Yarn the above way doesn't work and you get the outdated version available on Travis.