Store package cache in /tmp

This way it's possible to re-run e2e tests faster without re-downloading
all packages. `npm unpublish` is used to avoid getting warning about
publishing the same version of the package
This commit is contained in:
Alex Kotliarskyi 2015-04-11 11:13:47 -07:00
parent 52a268007b
commit 9024881f0e
3 changed files with 8 additions and 4 deletions

1
scripts/.gitignore vendored
View File

@ -1 +0,0 @@
.published-packages

View File

@ -1,4 +1,4 @@
storage: .published-packages
storage: /tmp/sinopia-package-cache
uplinks:
npmjs:

View File

@ -31,17 +31,22 @@ which sinopia || npm install -g sinopia
[ -f ~/.npmrc ] && cp ~/.npmrc ~/.npmrc.bak
cp $SCRIPTS/e2e-npmrc ~/.npmrc
[ -d $SCRIPTS/.published-packages ] && rm -r $SCRIPTS/.published-packages
sinopia --config $SCRIPTS/e2e-sinopia.config.yml &
SINOPIA_PID=$!
# Make sure to remove old version of react-native in
# case it was cached
npm unpublish react-native --force
npm unpublish react-native-cli --force
npm publish $ROOT
npm publish $ROOT/react-native-cli
npm install -g react-native-cli
react-native init EndToEndTest
cd EndToEndTest
# Make sure we installed local version of react-native
ls `basename $MARKER` > /dev/null
xctool -scheme EndToEndTest -sdk iphonesimulator8.1 test
xctool -scheme EndToEndTest -sdk iphonesimulator test