react-native-navigation的迁移库

1234567891011121314151617181920212223242526272829303132
  1. const exec = require('shell-utils').exec;
  2. function unitTests() {
  3. exec.execSync(`cd lib/android && ./gradlew clean testDebugUnitTest`);
  4. }
  5. function e2e() {
  6. if (!process.env.CI) {
  7. console.log(`e2e disabled on CI`); //eslint-disable-line
  8. return;
  9. }
  10. try {
  11. exec.execSync(`echo 'travis_fold:start:android-e2e'`);
  12. exec.execSync(`yarn run uninstall-android`);
  13. exec.execSync(`yarn run install-android`);
  14. exec.execSync(`cd AndroidE2E && ./gradlew connectedDebugAndroidTest`);
  15. } finally {
  16. exec.execSync(`echo 'travis_fold:end:android-e2e'`);
  17. }
  18. }
  19. function run() {
  20. if (process.env.CI) {
  21. exec.execSync(`./scripts/installAndroidSDK.sh`);
  22. }
  23. unitTests();
  24. e2e();
  25. }
  26. run();