Skip to content

Commit

Permalink
Use yarn in CircleCi
Browse files Browse the repository at this point in the history
  • Loading branch information
charpeni committed Nov 26, 2016
1 parent 2f66644 commit 23ff93b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions Example/__tests__/Example-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';

import Example from '../Example';
jest.unmock('Image');
jest.unmock('RCTEventEmitter');

import renderer from 'react-test-renderer';

Expand Down
20 changes: 15 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
machine:
pre:
- mkdir ~/.yarn-cache
node:
version: 7
version: stable
dependencies:
pre:
# Install Yarn
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq yarn=0.17.8-1
cache_directories:
- ~/.yarn-cache
override:
- npm install
- yarn install
- ? |
case $CIRCLE_NODE_INDEX in
2)
cd Example
npm install
yarn install
;;
esac
:
Expand All @@ -21,11 +31,11 @@ test:
node node_modules/eslint/bin/eslint index.js src/ test/ -o $CIRCLE_TEST_REPORTS/eslint/eslint.xml -f junit
;;
1)
MOCHA_FILE=$CIRCLE_TEST_REPORTS/mocha/junit.xml npm test -- --reporter mocha-junit-reporter
MOCHA_FILE=$CIRCLE_TEST_REPORTS/mocha/junit.xml yarn test -- --reporter mocha-junit-reporter
;;
2)
cd Example
npm run jest
yarn run jest
;;
esac
:
Expand Down

0 comments on commit 23ff93b

Please sign in to comment.