Rename Detox job, collect all e2e steps under test_end_to_end (#24689)

Summary:
Rename test_detox_end_to_end to test_end_to_end, then move JavaScript and iOS end-to-end tests to this job.

Fixes an issue in the end-to-end tests, but does not yet bring them back fully to green.

[General] [Changed] - Collect e2e tests under test_end_to_end job
Pull Request resolved: https://github.com/facebook/react-native/pull/24689

Differential Revision: D15202242

Pulled By: hramos

fbshipit-source-id: e7a9627896d2990cb6ddd0d3a91b915781ac2417
This commit is contained in:
Héctor Ramos 2019-05-03 14:34:57 -07:00 коммит произвёл Facebook Github Bot
Родитель 913ff9f5ae
Коммит 9bd276c06b
2 изменённых файлов: 26 добавлений и 17 удалений

Просмотреть файл

@ -309,10 +309,6 @@ jobs:
name: JavaScript Test Suite
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
- run:
name: JavaScript End-to-End Test Suite
command: node ./scripts/run-ci-e2e-tests.js --js --retries 3
- store_test_results:
path: ~/react-native/reports/junit
@ -368,7 +364,7 @@ jobs:
- run:
name: Start Metro packager
command: yarn start --nonPersistent --max-workers=1 || echo "Can't start packager automatically"
command: yarn start --max-workers=1 || echo "Can't start packager automatically"
background: true
- run:
@ -453,15 +449,11 @@ jobs:
# kill whatever is occupying port 5555 (web socket server)
lsof -i tcp:5555 | awk 'NR!=1 {print $2}' | xargs kill
- run:
name: iOS End-to-End Test Suite
command: node ./scripts/run-ci-e2e-tests.js --ios --retries 3;
- store_test_results:
path: ~/react-native/reports/junit
# Runs end to end tests (Detox)
test_detox_end_to_end:
# Runs end-to-end tests
test_end_to_end:
<<: *macos_defaults
steps:
- attach_workspace:
@ -496,13 +488,25 @@ jobs:
# Xcode build
- run:
name: Build iOS app for simulator
name: Build app for Detox iOS End-to-End Tests
command: yarn run build-ios-e2e
# Test
- run:
name: Run Detox Tests
name: Run Detox iOS End-to-End Tests
command: yarn run test-ios-e2e
when: always
- run:
name: Run JavaScript End-to-End Tests
command: node ./scripts/run-ci-e2e-tests.js --js --retries 3
when: always
- run:
name: Run iOS End-to-End Tests
command: node ./scripts/run-ci-e2e-tests.js --ios --retries 3;
when: always
# -------------------------
# JOBS: Test Android
@ -572,7 +576,7 @@ jobs:
- run:
name: Build JavaScript Bundle
command: node cli.js bundle --max-workers 2 --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
# Wait for AVD to finish booting before running tests
- run:
name: Wait for Android Virtual Device
@ -707,7 +711,7 @@ workflows:
- test_javascript: *run-after-checkout
- test_android: *run-after-checkout
- test_ios: *run-after-checkout
- test_detox_end_to_end: *run-after-checkout
- test_end_to_end: *run-after-checkout
- test_docker_build:
filters: *filter-ignore-gh-pages

Просмотреть файл

@ -109,7 +109,12 @@ try {
exitCode = 1;
throw Error(exitCode);
}
cp('metro.config.js', 'EndToEndTest/.');
const METRO_CONFIG = path.join(ROOT, 'metro.config.js');
const RN_POLYFILLS = path.join(ROOT, 'rn-get-polyfills.js');
cp(METRO_CONFIG, 'EndToEndTest/.');
cp(RN_POLYFILLS, 'EndToEndTest/.');
cd('EndToEndTest');
echo('Installing React Native package');
exec(`npm install ${PACKAGE}`);
@ -207,7 +212,7 @@ try {
// shelljs exec('', {async: true}) does not emit stdout events, so we rely on good old spawn
const packagerEnv = Object.create(process.env);
packagerEnv.REACT_NATIVE_MAX_WORKERS = 1;
const packagerProcess = spawn('yarn', ['start', '--nonPersistent'], {
const packagerProcess = spawn('yarn', ['start'], {
stdio: 'inherit',
env: packagerEnv,
});