Skip to content

Instantly share code, notes, and snippets.

@chriskjaer
Last active March 22, 2017 22:29
Show Gist options
  • Save chriskjaer/7642f76d9e9a7065a3b40f354890ec2d to your computer and use it in GitHub Desktop.
Save chriskjaer/7642f76d9e9a7065a3b40f354890ec2d to your computer and use it in GitHub Desktop.
Use Yarn on CircleCI with cache
machine:
pre:
- mkdir ~/.yarn-cache
dependencies:
pre:
- curl -o- -L https://yarnpkg.com/install.sh | bash
cache_directories:
- ~/.yarn-cache
override:
- yarn install
test:
override:
- yarn test
@chriskjaer
Copy link
Author

chriskjaer commented Oct 19, 2016

If you don't care about the newest version of yarn do:

dependencies:
  cache_directories:
    - ~/.yarn-cache
    - ~/.yarn
  pre:
    - if [[ ! -e ~/.yarn ]]; then curl -o- -L https://yarnpkg.com/install.sh | bash; fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment