2019-05-31 01:07:45 +03:00
|
|
|
version: 2.1
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-03-30 17:19:23 +03:00
|
|
|
# -------------------------
|
|
|
|
# ORBS
|
|
|
|
# -------------------------
|
|
|
|
|
|
|
|
orbs:
|
|
|
|
win: circleci/windows@2.4.0
|
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# DEFAULTS
|
|
|
|
# -------------------------
|
2017-09-21 23:34:02 +03:00
|
|
|
defaults: &defaults
|
|
|
|
working_directory: ~/react-native
|
2018-06-15 21:34:19 +03:00
|
|
|
environment:
|
|
|
|
- GIT_COMMIT_DESC: git log --format=oneline -n 1 $CIRCLE_SHA1
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
# The public github tokens are publicly visible by design
|
2020-12-07 14:10:46 +03:00
|
|
|
- PUBLIC_PULLBOT_GITHUB_TOKEN_A: &github_pullbot_token_a "a6edf8e8d40ce4e8b11a"
|
|
|
|
- PUBLIC_PULLBOT_GITHUB_TOKEN_B: &github_pullbot_token_b "150e1341f4dd9c944d2a"
|
|
|
|
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: &github_analysisbot_token_a "312d354b5c36f082cfe9"
|
|
|
|
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: &github_analysisbot_token_b "07973d757026bdd9f196"
|
2017-09-21 23:34:02 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
# -------------------------
|
|
|
|
# EXECUTORS
|
|
|
|
# -------------------------
|
|
|
|
executors:
|
2020-02-14 10:11:41 +03:00
|
|
|
nodelts:
|
2019-05-31 01:07:45 +03:00
|
|
|
<<: *defaults
|
|
|
|
docker:
|
2021-06-04 17:18:34 +03:00
|
|
|
# Note: Version set separately for Windows builds, see below.
|
2020-10-24 03:37:25 +03:00
|
|
|
- image: circleci/node:14
|
2020-02-14 10:11:41 +03:00
|
|
|
nodeprevlts:
|
2019-05-31 01:07:45 +03:00
|
|
|
<<: *defaults
|
|
|
|
docker:
|
2020-10-24 03:37:25 +03:00
|
|
|
- image: circleci/node:12
|
2019-05-31 01:07:45 +03:00
|
|
|
reactnativeandroid:
|
|
|
|
<<: *defaults
|
|
|
|
docker:
|
2021-11-24 23:23:45 +03:00
|
|
|
- image: reactnativecommunity/react-native-android:5.2
|
2019-05-31 01:07:45 +03:00
|
|
|
resource_class: "large"
|
|
|
|
environment:
|
|
|
|
- TERM: "dumb"
|
|
|
|
- ADB_INSTALL_TIMEOUT: 10
|
|
|
|
- GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"'
|
|
|
|
- BUILD_THREADS: 2
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
# Repeated here, as the environment key in this executor will overwrite the one in defaults
|
2020-12-07 14:10:46 +03:00
|
|
|
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: *github_analysisbot_token_a
|
|
|
|
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: *github_analysisbot_token_b
|
|
|
|
- PUBLIC_PULLBOT_GITHUB_TOKEN_A: *github_pullbot_token_a
|
|
|
|
- PUBLIC_PULLBOT_GITHUB_TOKEN_B: *github_pullbot_token_b
|
2019-05-31 01:07:45 +03:00
|
|
|
reactnativeios:
|
|
|
|
<<: *defaults
|
|
|
|
macos:
|
2021-09-29 08:26:26 +03:00
|
|
|
xcode: &_XCODE_VERSION "13.0.0"
|
2019-05-31 01:07:45 +03:00
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# COMMANDS
|
|
|
|
# -------------------------
|
|
|
|
commands:
|
|
|
|
|
|
|
|
setup_artifacts:
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Initial Setup
|
2019-12-20 03:53:54 +03:00
|
|
|
command: mkdir -p ./reports/{buck,build,junit,outputs}
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2021-10-02 07:21:03 +03:00
|
|
|
setup_ruby:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
key: 1-gems-{{ checksum "Gemfile.lock" }}
|
|
|
|
- run: bundle check || bundle install --path vendor/bundle --clean
|
|
|
|
- save_cache:
|
|
|
|
key: 1-gems-{{ checksum "Gemfile.lock" }}
|
|
|
|
paths:
|
|
|
|
- vendor/bundle
|
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
run_yarn:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-11-27 18:40:48 +03:00
|
|
|
- v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
|
2019-05-31 01:07:45 +03:00
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: "Yarn: Install Dependencies"
|
2019-05-31 01:07:45 +03:00
|
|
|
command: |
|
|
|
|
# Skip yarn install on metro bump commits as the package is not yet
|
|
|
|
# available on npm
|
|
|
|
if [[ $(echo "$GIT_COMMIT_DESC" | grep -c "Bump metro@") -eq 0 ]]; then
|
|
|
|
yarn install --non-interactive --cache-folder ~/.cache/yarn
|
|
|
|
fi
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/.cache/yarn
|
2019-11-27 18:40:48 +03:00
|
|
|
key: v4-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
|
2019-05-31 01:07:45 +03:00
|
|
|
|
|
|
|
install_buck_tooling:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
|
|
|
|
- run:
|
|
|
|
name: Install BUCK
|
|
|
|
command: |
|
|
|
|
buck --version
|
|
|
|
# Install related tooling
|
|
|
|
if [[ ! -e ~/okbuck ]]; then
|
|
|
|
git clone https://github.com/uber/okbuck.git ~/okbuck --depth=1
|
|
|
|
fi
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/buck
|
|
|
|
- ~/okbuck
|
|
|
|
key: v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
|
|
|
|
|
2020-02-13 09:18:46 +03:00
|
|
|
install_github_bot_deps:
|
|
|
|
steps:
|
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: "Yarn: Install dependencies (GitHub bots)"
|
2020-02-13 09:18:46 +03:00
|
|
|
command: cd bots && yarn install --non-interactive --cache-folder ~/.cache/yarn
|
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
brew_install:
|
|
|
|
parameters:
|
|
|
|
package:
|
|
|
|
description: Homebrew package to install
|
|
|
|
type: string
|
|
|
|
steps:
|
2020-07-10 17:13:17 +03:00
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: "Brew: Install << parameters.package >>"
|
|
|
|
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install << parameters.package >> >/dev/null
|
2019-05-31 01:07:45 +03:00
|
|
|
|
|
|
|
with_brew_cache_span:
|
|
|
|
parameters:
|
|
|
|
steps:
|
|
|
|
type: steps
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2020-09-03 19:29:54 +03:00
|
|
|
- v4-brew
|
2019-05-31 01:07:45 +03:00
|
|
|
- steps: << parameters.steps >>
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- /usr/local/Homebrew
|
|
|
|
- ~/Library/Caches/Homebrew
|
2020-09-03 19:29:54 +03:00
|
|
|
key: v4-brew
|
2019-05-31 01:07:45 +03:00
|
|
|
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
with_rntester_pods_cache_span:
|
2019-06-29 05:12:42 +03:00
|
|
|
parameters:
|
|
|
|
steps:
|
|
|
|
type: steps
|
|
|
|
steps:
|
2019-07-25 21:42:49 +03:00
|
|
|
- run:
|
|
|
|
name: Setup CocoaPods cache
|
2020-08-20 03:54:30 +03:00
|
|
|
# Copy packages/rn-tester/Podfile.lock since it can be changed by pod install
|
|
|
|
command: cp packages/rn-tester/Podfile.lock packages/rn-tester/Podfile.lock.bak
|
2019-06-29 05:12:42 +03:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2020-12-04 11:23:38 +03:00
|
|
|
# The committed lockfile is generated using USE_FRAMEWORKS=0 and USE_HERMES=0 so it could load an outdated cache if a change
|
|
|
|
# only affects the frameworks or hermes config. To help prevent this also cache based on the content of Podfile.
|
|
|
|
- v3-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
|
2019-06-29 05:12:42 +03:00
|
|
|
- steps: << parameters.steps >>
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
2020-08-20 03:54:30 +03:00
|
|
|
- packages/rn-tester/Pods
|
2020-12-04 11:23:38 +03:00
|
|
|
key: v3-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
|
2019-06-29 05:12:42 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
download_gradle_dependencies:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2021-11-15 17:46:09 +03:00
|
|
|
- v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "ReactAndroid/gradle.properties" }}
|
2019-05-31 01:07:45 +03:00
|
|
|
- run:
|
|
|
|
name: Download Dependencies Using Gradle
|
|
|
|
command: ./scripts/circleci/gradle_download_deps.sh
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/.gradle
|
|
|
|
- ReactAndroid/build/downloads
|
|
|
|
- ReactAndroid/build/third-party-ndk
|
2021-11-15 17:46:09 +03:00
|
|
|
key: v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "ReactAndroid/gradle.properties" }}
|
2019-05-31 01:07:45 +03:00
|
|
|
|
|
|
|
download_buck_dependencies:
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Download Dependencies Using Buck
|
|
|
|
command: ./scripts/circleci/buck_fetch.sh
|
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
run_e2e:
|
|
|
|
parameters:
|
|
|
|
platform:
|
|
|
|
description: Target platform
|
|
|
|
type: enum
|
|
|
|
enum: ["android", "ios", "js"]
|
|
|
|
default: "js"
|
|
|
|
retries:
|
|
|
|
description: How many times the job should try to run these tests
|
|
|
|
type: integer
|
|
|
|
default: 3
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: "Run Tests: << parameters.platform >> End-to-End Tests"
|
|
|
|
command: node ./scripts/run-ci-e2e-tests.js --<< parameters.platform >> --retries << parameters.retries >>
|
|
|
|
|
|
|
|
report_bundle_size:
|
|
|
|
parameters:
|
|
|
|
platform:
|
|
|
|
description: Target platform
|
|
|
|
type: enum
|
|
|
|
enum: ["android", "ios"]
|
|
|
|
steps:
|
|
|
|
- install_github_bot_deps
|
|
|
|
- run:
|
|
|
|
name: Report size of RNTester.app (analysis-bot)
|
2021-11-03 22:09:13 +03:00
|
|
|
command: GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" scripts/circleci/report-bundle-size.sh << parameters.platform >> || true
|
2020-04-01 03:36:31 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS
|
|
|
|
# -------------------------
|
2017-09-21 23:34:02 +03:00
|
|
|
jobs:
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Analyze PR
|
|
|
|
# -------------------------
|
|
|
|
# Analyze pull request and raise any lint/flow issues.
|
|
|
|
# Issues will be posted to the PR itself via GitHub bots.
|
|
|
|
# This workflow should only fail if the bots fail to run.
|
|
|
|
analyze_pr:
|
2020-12-07 14:10:46 +03:00
|
|
|
executor: reactnativeandroid
|
2019-02-24 04:01:34 +03:00
|
|
|
steps:
|
2021-09-15 11:33:10 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- run_yarn
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-02-13 09:18:46 +03:00
|
|
|
- install_github_bot_deps
|
|
|
|
|
2021-02-12 22:30:53 +03:00
|
|
|
# Note: The yarn gpg key needs to be refreshed to work around https://github.com/yarnpkg/yarn/issues/7866
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
2020-02-13 09:18:46 +03:00
|
|
|
name: Install additional GitHub bot dependencies
|
2021-10-02 03:00:23 +03:00
|
|
|
# TEMP: Added workaround from https://github.com/nodesource/distributions/issues/1266#issuecomment-932583579
|
2021-02-12 22:30:53 +03:00
|
|
|
command: |
|
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
apt update && apt install -y shellcheck jq
|
2021-10-02 03:00:23 +03:00
|
|
|
apt-get install openssl ca-certificates
|
|
|
|
update-ca-certificates
|
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
apt update && apt install -y shellcheck jq
|
2019-02-24 04:01:34 +03:00
|
|
|
|
|
|
|
- run:
|
2019-05-22 05:35:40 +03:00
|
|
|
name: Run linters against modified files (analysis-bot)
|
|
|
|
command: GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" yarn lint-ci
|
2019-02-24 04:01:34 +03:00
|
|
|
when: always
|
|
|
|
|
|
|
|
- run:
|
2019-05-22 05:35:40 +03:00
|
|
|
name: Analyze Pull Request (pull-bot)
|
2019-02-24 04:01:34 +03:00
|
|
|
command: |
|
|
|
|
cd bots
|
2019-05-22 05:35:40 +03:00
|
|
|
DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" yarn danger ci --use-github-checks
|
2019-02-24 04:01:34 +03:00
|
|
|
when: always
|
2019-05-22 05:35:40 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Analyze Code
|
|
|
|
# -------------------------
|
2019-05-31 01:07:45 +03:00
|
|
|
analyze_code:
|
2020-12-07 14:10:46 +03:00
|
|
|
executor: reactnativeandroid
|
2018-02-09 01:57:36 +03:00
|
|
|
steps:
|
2021-09-15 11:33:10 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
2018-02-09 01:57:36 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Lint code
|
2019-12-20 03:53:54 +03:00
|
|
|
command: scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
|
2019-04-12 19:50:13 +03:00
|
|
|
when: always
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-12-07 14:10:46 +03:00
|
|
|
- run:
|
|
|
|
name: Lint Java
|
|
|
|
command: scripts/circleci/exec_swallow_error.sh yarn lint-java --check
|
|
|
|
when: always
|
|
|
|
|
2019-04-10 02:03:21 +03:00
|
|
|
- run:
|
2019-02-24 04:01:34 +03:00
|
|
|
name: Check for errors in code using Flow (iOS)
|
|
|
|
command: yarn flow-check-ios
|
|
|
|
when: always
|
|
|
|
|
2019-04-10 02:03:21 +03:00
|
|
|
- run:
|
2019-02-24 04:01:34 +03:00
|
|
|
name: Check for errors in code using Flow (Android)
|
|
|
|
command: yarn flow-check-android
|
|
|
|
when: always
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Sanity checks
|
|
|
|
command: |
|
|
|
|
./scripts/circleci/check_license.sh
|
|
|
|
./scripts/circleci/validate_yarn_lockfile.sh
|
|
|
|
when: always
|
2017-09-21 23:34:02 +03:00
|
|
|
|
2019-04-12 19:50:13 +03:00
|
|
|
- run:
|
|
|
|
name: Check formatting
|
|
|
|
command: yarn run format-check
|
|
|
|
when: always
|
|
|
|
|
2018-02-01 04:08:06 +03:00
|
|
|
- store_test_results:
|
2019-12-20 03:53:54 +03:00
|
|
|
path: ./reports/junit
|
2018-02-01 04:08:06 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test JavaScript
|
|
|
|
# -------------------------
|
2019-05-31 01:07:45 +03:00
|
|
|
test_js:
|
|
|
|
parameters:
|
|
|
|
executor:
|
|
|
|
type: executor
|
2020-02-14 10:11:41 +03:00
|
|
|
default: nodelts
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
run_disabled_tests:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: << parameters.executor >>
|
2017-09-21 23:34:02 +03:00
|
|
|
steps:
|
2021-09-15 11:33:10 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- run:
|
|
|
|
name: Install rsync
|
|
|
|
command: sudo apt-get install rsync
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# -------------------------
|
|
|
|
# Run JavaScript tests
|
2019-04-12 19:50:13 +03:00
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: "Run Tests: JavaScript Tests"
|
2019-04-12 19:50:13 +03:00
|
|
|
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
|
2020-04-01 03:36:31 +03:00
|
|
|
- run_e2e:
|
|
|
|
platform: js
|
2019-02-24 04:01:34 +03:00
|
|
|
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
# Optionally, run disabled tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
2020-04-01 03:36:31 +03:00
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
|
|
|
# -------------------------
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
|
2018-08-21 03:31:59 +03:00
|
|
|
- store_test_results:
|
2019-12-20 03:53:54 +03:00
|
|
|
path: ./reports/junit
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test iOS
|
|
|
|
# -------------------------
|
2018-12-21 02:04:40 +03:00
|
|
|
test_ios:
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: reactnativeios
|
2019-07-25 21:42:49 +03:00
|
|
|
parameters:
|
|
|
|
use_frameworks:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2020-11-03 12:13:01 +03:00
|
|
|
use_hermes:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2020-04-01 03:36:31 +03:00
|
|
|
run_unit_tests:
|
|
|
|
description: Specifies whether unit tests should run.
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
run_detox_tests:
|
|
|
|
description: Specifies whether Detox e2e tests should run.
|
|
|
|
type: boolean
|
|
|
|
default: false
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
run_disabled_tests:
|
2020-04-01 03:36:31 +03:00
|
|
|
description: Specifies whether disabled tests should run. Set this to true to debug failing tests.
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
type: boolean
|
|
|
|
default: false
|
2019-04-24 19:26:56 +03:00
|
|
|
environment:
|
2019-12-20 03:53:54 +03:00
|
|
|
- REPORTS_DIR: "./reports/junit"
|
2017-10-14 02:11:53 +03:00
|
|
|
steps:
|
2021-09-15 11:33:10 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
2021-10-02 07:21:03 +03:00
|
|
|
- setup_ruby
|
2019-05-31 01:07:45 +03:00
|
|
|
- run_yarn
|
2018-02-01 04:08:06 +03:00
|
|
|
|
2019-06-29 05:12:42 +03:00
|
|
|
- run: |
|
2020-08-20 03:54:30 +03:00
|
|
|
cd packages/rn-tester
|
2019-06-29 05:12:42 +03:00
|
|
|
bundle check || bundle install
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
2019-06-29 05:12:42 +03:00
|
|
|
name: Boot iPhone Simulator
|
|
|
|
command: source scripts/.tests.env && xcrun simctl boot "$IOS_DEVICE" || true
|
2019-04-24 19:26:56 +03:00
|
|
|
|
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: Configure Environment Variables
|
2019-06-29 05:12:42 +03:00
|
|
|
command: |
|
2021-10-02 01:31:24 +03:00
|
|
|
echo 'export PATH=/usr/local/opt/node@14/bin:$PATH' >> $BASH_ENV
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
source $BASH_ENV
|
2019-04-24 19:26:56 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
- with_brew_cache_span:
|
|
|
|
steps:
|
|
|
|
- brew_install:
|
|
|
|
package: watchman
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- run:
|
|
|
|
name: "Brew: Tap wix/brew"
|
|
|
|
command: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
|
2019-05-31 01:07:45 +03:00
|
|
|
- brew_install:
|
|
|
|
package: applesimutils
|
2019-06-01 02:42:18 +03:00
|
|
|
|
2021-10-01 20:25:26 +03:00
|
|
|
- run:
|
|
|
|
name: Configure Node
|
|
|
|
# Sourcing find-node.sh will ensure nvm is set up.
|
|
|
|
# It also helps future invocation of find-node.sh prevent permission issue with nvm.sh.
|
2021-10-02 01:31:24 +03:00
|
|
|
command: source scripts/find-node.sh && nvm install 14 && nvm alias default 14
|
2021-10-01 20:25:26 +03:00
|
|
|
|
2019-07-11 21:54:38 +03:00
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: Configure Watchman
|
2021-10-01 06:23:45 +03:00
|
|
|
command: echo "{}" > .watchmanconfig
|
2019-07-11 21:54:38 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
- when:
|
|
|
|
condition: << parameters.use_frameworks >>
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Set USE_FRAMEWORKS=1
|
|
|
|
command: echo "export USE_FRAMEWORKS=1" >> $BASH_ENV
|
2019-05-04 00:34:57 +03:00
|
|
|
|
2020-11-03 12:13:01 +03:00
|
|
|
- when:
|
|
|
|
condition: << parameters.use_hermes >>
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Set USE_HERMES=1
|
|
|
|
command: echo "export USE_HERMES=1" >> $BASH_ENV
|
|
|
|
|
2020-07-10 17:13:17 +03:00
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: Setup the CocoaPods environment
|
2021-10-02 07:21:03 +03:00
|
|
|
command: bundle exec pod setup
|
2020-04-01 03:36:31 +03:00
|
|
|
|
|
|
|
- with_rntester_pods_cache_span:
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Generate RNTesterPods Workspace
|
2021-09-16 04:33:01 +03:00
|
|
|
command: cd packages/rn-tester && bundle exec pod install --verbose
|
2020-02-13 09:18:46 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# -------------------------
|
|
|
|
# Runs iOS unit tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_unit_tests >>
|
|
|
|
steps:
|
2020-07-10 17:13:17 +03:00
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: "Run Tests: iOS Unit and Integration Tests"
|
|
|
|
command: yarn test-ios
|
|
|
|
# Runs iOS Detox e2e tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_detox_tests >>
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: "Run Tests: Detox iOS End-to-End Tests"
|
|
|
|
command: yarn run build-ios-e2e && yarn run test-ios-e2e
|
2017-10-14 02:11:53 +03:00
|
|
|
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
# Optionally, run disabled tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
2020-04-01 03:36:31 +03:00
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- run:
|
|
|
|
name: "Run Tests: CocoaPods"
|
|
|
|
command: ./scripts/process-podspecs.sh
|
|
|
|
- run:
|
|
|
|
name: Free up port 8081 for iOS End-to-End Tests
|
|
|
|
command: |
|
|
|
|
# free up port 8081 for the packager before running tests
|
|
|
|
set +eo pipefail
|
|
|
|
lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill
|
|
|
|
set -eo pipefail
|
2020-04-01 03:36:31 +03:00
|
|
|
- run_e2e:
|
|
|
|
platform: ios
|
|
|
|
# -------------------------
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# Collect Results
|
|
|
|
- report_bundle_size:
|
|
|
|
platform: ios
|
2019-05-31 01:07:45 +03:00
|
|
|
- store_test_results:
|
2019-12-20 03:53:54 +03:00
|
|
|
path: ./reports/junit
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test Android
|
|
|
|
# -------------------------
|
2018-02-09 01:57:36 +03:00
|
|
|
test_android:
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: reactnativeandroid
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
parameters:
|
|
|
|
run_disabled_tests:
|
|
|
|
type: boolean
|
2020-07-10 17:13:17 +03:00
|
|
|
default: false
|
2017-09-21 23:34:02 +03:00
|
|
|
steps:
|
2021-09-15 11:33:10 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
2018-02-01 01:48:51 +03:00
|
|
|
|
2018-07-23 23:28:17 +03:00
|
|
|
# Validate Android SDK installation and packages
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Validate Android SDK Install
|
|
|
|
command: ./scripts/validate-android-sdk.sh
|
2018-03-10 04:06:51 +03:00
|
|
|
|
2018-05-08 00:24:32 +03:00
|
|
|
# Starting emulator in advance as it takes some time to boot.
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Create Android Virtual Device
|
2019-04-10 02:03:21 +03:00
|
|
|
command: source scripts/android-setup.sh && createAVD
|
|
|
|
- run:
|
2019-02-24 04:01:34 +03:00
|
|
|
name: Launch Android Virtual Device in Background
|
|
|
|
command: source scripts/android-setup.sh && launchAVD
|
|
|
|
background: true
|
2018-02-09 01:57:36 +03:00
|
|
|
|
2018-07-23 23:28:17 +03:00
|
|
|
# Install Buck
|
2019-05-31 01:07:45 +03:00
|
|
|
- install_buck_tooling
|
2017-12-22 22:07:48 +03:00
|
|
|
|
2018-07-23 23:28:17 +03:00
|
|
|
# Validate Android test environment (including Buck)
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Validate Android Test Environment
|
2019-04-10 02:03:21 +03:00
|
|
|
command: ./scripts/validate-android-test-env.sh
|
2018-03-10 04:06:51 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
- download_buck_dependencies
|
|
|
|
- download_gradle_dependencies
|
2017-12-22 22:07:48 +03:00
|
|
|
|
2018-02-06 23:36:07 +03:00
|
|
|
# Build and compile
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Build Android App
|
|
|
|
command: |
|
|
|
|
buck build ReactAndroid/src/main/java/com/facebook/react
|
|
|
|
buck build ReactAndroid/src/main/java/com/facebook/react/shell
|
|
|
|
- run:
|
|
|
|
name: Compile Native Libs for Unit and Integration Tests
|
|
|
|
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS
|
2021-11-01 15:56:47 +03:00
|
|
|
no_output_timeout: 30m
|
2017-12-22 22:07:48 +03:00
|
|
|
|
2018-02-06 23:36:07 +03:00
|
|
|
# Build JavaScript Bundle for instrumentation tests
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Build JavaScript Bundle
|
2019-04-24 14:44:27 +03:00
|
|
|
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
|
2019-05-04 00:34:57 +03:00
|
|
|
|
2017-12-22 22:07:48 +03:00
|
|
|
# Wait for AVD to finish booting before running tests
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Wait for Android Virtual Device
|
2019-04-10 02:03:21 +03:00
|
|
|
command: source scripts/android-setup.sh && waitForAVD
|
2018-03-10 04:06:51 +03:00
|
|
|
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- run:
|
|
|
|
name: Assemble RNTester App
|
2020-08-20 03:54:30 +03:00
|
|
|
command: ./gradlew packages:rn-tester:android:app:assembleRelease
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# -------------------------
|
|
|
|
# Run Android tests
|
2018-09-29 03:00:18 +03:00
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: "Run Tests: Android Unit Tests"
|
2019-12-20 03:53:54 +03:00
|
|
|
command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS --xml ./reports/buck/all-results-raw.xml
|
2017-10-16 21:52:48 +03:00
|
|
|
- run:
|
2020-10-31 22:46:14 +03:00
|
|
|
name: "Build Tests: Android Instrumentation Tests"
|
|
|
|
# Here, just build the instrumentation tests. There is a known issue with installing the APK to android-21+ emulator.
|
2017-10-16 21:52:48 +03:00
|
|
|
command: |
|
2019-02-24 04:01:34 +03:00
|
|
|
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
|
|
|
|
echo "JavaScript bundle missing, cannot run instrumentation tests. Verify Build JavaScript Bundle step completed successfully."; exit 1;
|
|
|
|
fi
|
2020-10-31 22:46:14 +03:00
|
|
|
source scripts/android-setup.sh && NO_BUCKD=1 retry3 timeout 300 buck build ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
|
2019-04-10 02:03:21 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# Optionally, run disabled tests
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
2020-04-01 03:36:31 +03:00
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
|
|
|
- run_e2e:
|
|
|
|
platform: android
|
|
|
|
# -------------------------
|
2020-02-13 09:18:46 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# Collect Results
|
2020-04-01 03:36:31 +03:00
|
|
|
- report_bundle_size:
|
|
|
|
platform: android
|
2017-10-16 21:52:48 +03:00
|
|
|
- run:
|
2019-02-24 04:01:34 +03:00
|
|
|
name: Collect Test Results
|
2017-10-16 21:52:48 +03:00
|
|
|
command: |
|
2019-12-20 03:53:54 +03:00
|
|
|
find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ./reports/build/ \;
|
|
|
|
find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ./reports/outputs/ \;
|
|
|
|
find . -type f -regex ".*/buck-out/gen/ReactAndroid/src/test/.*/.*xml" -exec cp {} ./reports/buck/ \;
|
2019-07-13 01:54:22 +03:00
|
|
|
if [ -f ~/react-native/reports/buck/all-results-raw.xml ]; then
|
2020-01-15 04:32:48 +03:00
|
|
|
cd ~/okbuck
|
2019-12-20 03:53:54 +03:00
|
|
|
./tooling/junit/buck_to_junit.sh ~/react-native/reports/buck/all-results-raw.xml ~/react-native/reports/junit/results.xml
|
2019-07-13 01:54:22 +03:00
|
|
|
fi
|
2017-10-16 21:52:48 +03:00
|
|
|
when: always
|
2019-02-24 04:01:34 +03:00
|
|
|
- store_test_results:
|
2019-12-20 03:53:54 +03:00
|
|
|
path: ./reports/junit
|
2019-04-10 02:03:21 +03:00
|
|
|
|
2021-09-24 11:02:07 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test Android Template
|
|
|
|
# -------------------------
|
|
|
|
test_android_template:
|
|
|
|
executor: reactnativeandroid
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run_yarn
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Setup the Android Template
|
|
|
|
command: |
|
|
|
|
cd template
|
|
|
|
sed -i 's/1000\.0\.0/file\:\.\./g' package.json
|
|
|
|
npm install
|
|
|
|
# react-native-community/cli is needed as the Android template is referencing a .gradle file inside it.
|
|
|
|
npm i @react-native-community/cli
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Bundle the latest version of ReactAndroid
|
|
|
|
command: ./gradlew :ReactAndroid:publishReleasePublicationToNpmRepository
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build the template application
|
|
|
|
command: cd template/android/ && ./gradlew assembleDebug
|
|
|
|
|
2021-10-29 01:46:53 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test iOS Template
|
|
|
|
# -------------------------
|
|
|
|
test_ios_template:
|
|
|
|
executor: reactnativeios
|
|
|
|
environment:
|
|
|
|
- PROJECT_NAME: "iOSTemplateProject"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run_yarn
|
|
|
|
- attach_workspace:
|
|
|
|
at: .
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Create iOS template project
|
|
|
|
command: |
|
|
|
|
REPO_ROOT=$(pwd)
|
|
|
|
PACKAGE=$(cat build/react-native-package-version)
|
|
|
|
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE"
|
|
|
|
node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
|
|
|
|
mkdir -p ~/tmp
|
|
|
|
cd ~/tmp
|
|
|
|
node "$REPO_ROOT/cli.js" init "$PROJECT_NAME" --template "$REPO_ROOT"
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build template project
|
|
|
|
command: |
|
|
|
|
xcodebuild build \
|
|
|
|
-workspace ~/tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \
|
|
|
|
-scheme $PROJECT_NAME \
|
|
|
|
-sdk iphonesimulator
|
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Windows
|
|
|
|
# -------------------------
|
|
|
|
test_windows:
|
|
|
|
executor:
|
|
|
|
name: win/default
|
|
|
|
parameters:
|
|
|
|
run_disabled_tests:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
environment:
|
|
|
|
- ANDROID_HOME: "C:\\Android\\android-sdk"
|
2021-01-04 20:12:53 +03:00
|
|
|
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944"
|
2021-11-24 23:23:45 +03:00
|
|
|
- ANDROID_BUILD_VERSION: 31
|
|
|
|
- ANDROID_TOOLS_VERSION: 31.0.0
|
2020-04-01 03:36:31 +03:00
|
|
|
- GRADLE_OPTS: -Dorg.gradle.daemon=false
|
2021-06-17 14:20:46 +03:00
|
|
|
- NDK_VERSION: 21.4.7075529
|
2020-04-01 03:36:31 +03:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
2021-06-04 17:18:34 +03:00
|
|
|
- run:
|
|
|
|
name: Install Node
|
|
|
|
# Note: Version set separately for non-Windows builds, see above.
|
|
|
|
command: |
|
|
|
|
nvm install 14.17.0
|
|
|
|
nvm use 14.17.0
|
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# Setup Dependencies
|
|
|
|
- run:
|
|
|
|
name: Install Yarn
|
|
|
|
command: choco install yarn
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Display Environment info
|
|
|
|
command: npx envinfo@latest
|
|
|
|
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-win-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
|
|
|
|
- run:
|
|
|
|
name: "Yarn: Install Dependencies"
|
|
|
|
command: yarn install --frozen-lockfile --non-interactive
|
|
|
|
- save_cache:
|
|
|
|
key: v1-win-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
|
|
|
|
paths:
|
|
|
|
- C:\Users\circleci\AppData\Local\Yarn
|
|
|
|
|
2021-02-04 01:59:17 +03:00
|
|
|
# Try to install the SDK up to 3 times, since network flakiness can cause install failures
|
|
|
|
# Using a timeout of 9 mins, as circle ci will timeout if there is no output for 10 mins
|
2020-04-01 03:36:31 +03:00
|
|
|
- run:
|
|
|
|
name: Install Android SDK Tools
|
2021-02-04 01:59:17 +03:00
|
|
|
command: choco install android-sdk --timeout 540; if (!$?) { choco install android-sdk --timeout 540 --force --forcedependencies}; if (!$?) { choco install android-sdk --force --forcedependencies}
|
2020-04-01 03:36:31 +03:00
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Setup Android SDKs
|
|
|
|
command: |
|
|
|
|
sdkmanager --licenses
|
2020-10-21 02:58:29 +03:00
|
|
|
sdkmanager "system-images;android-21;google_apis;armeabi-v7a"
|
2020-04-01 03:36:31 +03:00
|
|
|
sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
|
|
|
|
sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
|
|
|
|
sdkmanager "add-ons;addon-google_apis-google-23"
|
|
|
|
sdkmanager "extras;android;m2repository"
|
|
|
|
sdkmanager "ndk;%NDK_VERSION%"
|
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# Run Tests
|
|
|
|
- run:
|
|
|
|
name: "Flow: Check Android"
|
|
|
|
command: yarn flow-check-android
|
|
|
|
- run:
|
|
|
|
name: "Flow: Check iOS"
|
|
|
|
command: yarn flow-check-ios
|
|
|
|
- run:
|
|
|
|
name: "Run Tests: JavaScript Tests"
|
|
|
|
command: yarn test
|
|
|
|
|
|
|
|
# Optionally, run disabled tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
|
|
|
- run:
|
|
|
|
name: Android Build
|
2020-08-20 03:54:30 +03:00
|
|
|
command: ./gradlew.bat packages:rn-tester:android:app:assembleRelease
|
2020-04-01 03:36:31 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Coverage
|
|
|
|
# -------------------------
|
|
|
|
# Collect JavaScript test coverage
|
2018-12-01 06:45:56 +03:00
|
|
|
js_coverage:
|
2020-02-14 10:11:41 +03:00
|
|
|
executor: nodelts
|
2018-12-03 22:44:07 +03:00
|
|
|
environment:
|
|
|
|
- CI_BRANCH: $CIRCLE_BRANCH
|
|
|
|
- CI_PULL_REQUEST: $CIRCLE_PULL_REQUEST
|
|
|
|
- CI_BUILD_NUMBER: $CIRCLE_BUILD_NUM
|
|
|
|
- CI_BUILD_URL: $CIRCLE_BUILD_URL
|
2018-12-01 06:45:56 +03:00
|
|
|
steps:
|
2021-09-15 11:33:10 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
2019-12-12 23:17:29 +03:00
|
|
|
name: Collect test coverage information
|
2019-02-24 04:01:34 +03:00
|
|
|
command: |
|
2019-12-12 23:17:29 +03:00
|
|
|
scripts/circleci/exec_swallow_error.sh yarn test --coverage --maxWorkers=2
|
|
|
|
if [[ -e ./coverage/lcov.info ]]; then
|
|
|
|
cat ./coverage/lcov.info | scripts/circleci/exec_swallow_error.sh ./node_modules/.bin/coveralls
|
|
|
|
fi
|
2018-12-01 06:45:56 +03:00
|
|
|
- store_artifacts:
|
|
|
|
path: ~/react-native/coverage/
|
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Releases
|
|
|
|
# -------------------------
|
2021-12-01 03:48:47 +03:00
|
|
|
prepare_package_for_release:
|
|
|
|
executor: reactnativeios
|
|
|
|
steps:
|
|
|
|
- add_ssh_keys:
|
|
|
|
fingerprints:
|
|
|
|
- "1c:98:e0:3a:52:79:95:29:12:cd:b4:87:5b:41:e2:bb"
|
|
|
|
- run:
|
|
|
|
name: "Set new react-native version and commit changes"
|
|
|
|
command: |
|
|
|
|
node ./scripts/prepare-package-for-release.js
|
|
|
|
|
2021-09-29 02:26:08 +03:00
|
|
|
build_npm_package:
|
2020-03-14 07:46:45 +03:00
|
|
|
parameters:
|
|
|
|
publish_npm_args:
|
|
|
|
type: string
|
2021-09-29 02:26:08 +03:00
|
|
|
default: --dry-run
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: reactnativeandroid
|
2018-07-23 23:28:17 +03:00
|
|
|
steps:
|
2020-03-24 21:04:57 +03:00
|
|
|
- run:
|
|
|
|
name: Add github.com to SSH known hosts
|
|
|
|
command: |
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo '|1|If6MU203eXTaaWL678YEfWkVMrw=|kqLeIAyTy8pzpj8x8Ae4Fr8Mtlc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
|
2021-09-15 11:33:10 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- run_yarn
|
|
|
|
- install_buck_tooling
|
|
|
|
- download_buck_dependencies
|
|
|
|
- download_gradle_dependencies
|
2021-09-29 02:26:08 +03:00
|
|
|
# Only tagged releases and nightlies should be able to publish to npm
|
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
or:
|
|
|
|
- equal: [ --release, << parameters.publish_npm_args >> ]
|
|
|
|
- equal: [ --nightly, << parameters.publish_npm_args >> ]
|
|
|
|
steps:
|
|
|
|
- run: echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc
|
|
|
|
- run: |
|
|
|
|
git config --global user.email "react-native-bot@users.noreply.github.com"
|
|
|
|
git config --global user.name "npm Deployment Script"
|
|
|
|
echo "machine github.com login react-native-bot password $GITHUB_TOKEN" > ~/.netrc
|
2020-03-14 07:46:45 +03:00
|
|
|
- run: node ./scripts/publish-npm.js << parameters.publish_npm_args >>
|
2021-09-24 23:47:36 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
equal: [ --dry-run, << parameters.publish_npm_args >> ]
|
|
|
|
steps:
|
2021-09-25 20:04:47 +03:00
|
|
|
- run:
|
|
|
|
name: Build release package as a job artifact
|
|
|
|
command: |
|
|
|
|
mkdir -p build
|
|
|
|
FILENAME=$(npm pack)
|
|
|
|
mv $FILENAME build/
|
2021-10-29 01:46:53 +03:00
|
|
|
echo $FILENAME > build/react-native-package-version
|
2021-09-24 23:47:36 +03:00
|
|
|
- store_artifacts:
|
2021-09-25 20:04:47 +03:00
|
|
|
path: ~/react-native/build/
|
2021-09-24 23:47:36 +03:00
|
|
|
destination: build
|
2021-10-29 01:46:53 +03:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- build/*
|
|
|
|
|
2021-10-09 03:53:18 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
matches: { pattern: '^pull\/.*$', value: << pipeline.git.branch >> }
|
|
|
|
steps:
|
2021-10-12 07:23:38 +03:00
|
|
|
- install_github_bot_deps
|
2021-10-09 03:53:18 +03:00
|
|
|
- run:
|
|
|
|
name: Post link to PR build artifacts (pull-bot)
|
2021-11-06 03:27:23 +03:00
|
|
|
command: GITHUB_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" scripts/circleci/post-artifacts-link.sh || true
|
2018-07-23 23:28:17 +03:00
|
|
|
|
2021-11-12 22:31:21 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
equal: [ --release, << parameters.publish_npm_args >> ]
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Update rn-diff-purge to generate upgrade-support diff
|
|
|
|
command: |
|
|
|
|
curl -X POST https://api.github.com/repos/react-native-community/rn-diff-purge/dispatches \
|
|
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
|
|
-u "$PAT_USERNAME:$PAT_TOKEN" \
|
|
|
|
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${CIRCLE_TAG:1}\" }}"
|
|
|
|
|
2020-02-27 05:07:09 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Nightly
|
|
|
|
# -------------------------
|
|
|
|
nightly_job:
|
2021-10-02 01:31:24 +03:00
|
|
|
machine:
|
|
|
|
image: ubuntu-2004:202010-01
|
2020-02-27 05:07:09 +03:00
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Nightly
|
|
|
|
command: |
|
|
|
|
echo "Nightly build run"
|
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# WORK FLOWS
|
|
|
|
# -------------------------
|
2017-09-21 23:34:02 +03:00
|
|
|
workflows:
|
2020-02-27 05:07:09 +03:00
|
|
|
version: 2
|
|
|
|
|
2018-02-13 19:08:18 +03:00
|
|
|
tests:
|
2017-09-21 23:34:02 +03:00
|
|
|
jobs:
|
2021-10-29 01:46:53 +03:00
|
|
|
- build_npm_package:
|
|
|
|
# Build a release package on every untagged commit, but do not publish to npm.
|
|
|
|
publish_npm_args: --dry-run
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- main
|
|
|
|
- /^pull\/.*$/
|
2021-09-15 11:33:10 +03:00
|
|
|
- test_js:
|
|
|
|
run_disabled_tests: false
|
2019-05-31 01:07:45 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
2021-09-15 11:33:10 +03:00
|
|
|
- test_android:
|
|
|
|
run_disabled_tests: false
|
2019-05-31 01:07:45 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
2021-09-24 11:02:07 +03:00
|
|
|
- test_android_template:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
2021-10-29 01:46:53 +03:00
|
|
|
- test_ios_template:
|
|
|
|
requires:
|
|
|
|
- build_npm_package
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
2019-05-31 01:07:45 +03:00
|
|
|
- test_ios:
|
2020-11-03 12:13:01 +03:00
|
|
|
name: test_ios_unit_jsc
|
|
|
|
run_unit_tests: true
|
2021-09-15 11:33:10 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
2020-12-29 01:26:55 +03:00
|
|
|
# DISABLED: USE_FRAMEWORKS=1 not supported by Flipper
|
|
|
|
# - test_ios:
|
|
|
|
# name: test_ios_unit_frameworks_jsc
|
|
|
|
# use_frameworks: true
|
|
|
|
# run_unit_tests: true
|
2020-11-03 12:13:01 +03:00
|
|
|
- test_ios:
|
|
|
|
name: test_ios_unit_hermes
|
|
|
|
use_hermes: true
|
2020-04-01 03:36:31 +03:00
|
|
|
run_unit_tests: true
|
2021-09-15 11:33:10 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
2020-12-29 01:26:55 +03:00
|
|
|
# DISABLED: USE_FRAMEWORKS=1 not supported by Flipper
|
|
|
|
# - test_ios:
|
|
|
|
# name: test_ios_unit_frameworks_hermes
|
|
|
|
# use_hermes: true
|
|
|
|
# use_frameworks: true
|
|
|
|
# run_unit_tests: true
|
|
|
|
# DISABLED: Detox tests need to be fixed
|
2020-07-10 17:13:17 +03:00
|
|
|
# - test_ios:
|
|
|
|
# name: test_ios_detox
|
|
|
|
# run_detox_tests: true
|
2020-12-29 01:26:55 +03:00
|
|
|
# DISABLED: USE_FRAMEWORKS=1 not supported by Flipper
|
2020-07-10 17:13:17 +03:00
|
|
|
# - test_ios:
|
|
|
|
# name: test_ios_detox_frameworks
|
|
|
|
# use_frameworks: true
|
|
|
|
# run_detox_tests: true
|
2019-05-31 01:07:45 +03:00
|
|
|
- test_js:
|
2020-02-14 10:11:41 +03:00
|
|
|
name: test_js_prev_lts
|
|
|
|
executor: nodeprevlts
|
2021-09-15 11:33:10 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
2020-04-01 03:36:31 +03:00
|
|
|
- test_windows:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
|
|
|
run_disabled_tests: false
|
|
|
|
|
2018-12-01 06:45:56 +03:00
|
|
|
releases:
|
|
|
|
jobs:
|
2021-12-01 03:48:47 +03:00
|
|
|
# This job will trigger on pushes to release branch and commit a version tag to trigger `build_npm_package` for release
|
|
|
|
- prepare_package_for_release:
|
|
|
|
name: prepare_package_for_release
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- /^(\d+)\.(\d+)-stable$/
|
|
|
|
|
|
|
|
# This job will trigger when a version tag is pushed (by prepare_package_for_release)
|
2021-09-29 02:26:08 +03:00
|
|
|
- build_npm_package:
|
|
|
|
name: build_and_publish_npm_package
|
2021-11-12 22:31:21 +03:00
|
|
|
context: react-native-bot
|
2021-09-29 02:26:08 +03:00
|
|
|
publish_npm_args: --release
|
2019-09-09 16:39:51 +03:00
|
|
|
filters:
|
|
|
|
# Both of the following conditions must be included!
|
|
|
|
# Ignore any commit on any branch by default.
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
# Only act on version tags.
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
|
2018-06-14 23:48:15 +03:00
|
|
|
|
2018-12-01 06:45:56 +03:00
|
|
|
analysis:
|
|
|
|
jobs:
|
2019-05-31 01:07:45 +03:00
|
|
|
# Run lints on every commit other than those to the gh-pages branch
|
|
|
|
- analyze_code:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
|
|
|
|
2018-10-05 21:26:14 +03:00
|
|
|
# Run code checks on PRs from forks
|
2018-05-08 00:24:32 +03:00
|
|
|
- analyze_pr:
|
2019-05-31 01:07:45 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: /^pull\/.*$/
|
2018-12-01 06:45:56 +03:00
|
|
|
|
2019-06-01 02:42:18 +03:00
|
|
|
# Gather coverage
|
2018-12-01 06:45:56 +03:00
|
|
|
- js_coverage:
|
2021-09-15 11:33:10 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: gh-pages
|
|
|
|
|
2020-02-27 05:07:09 +03:00
|
|
|
nightly:
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
2021-09-29 10:09:53 +03:00
|
|
|
cron: "0 20 * * *"
|
2020-02-27 05:07:09 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
2021-07-15 22:22:38 +03:00
|
|
|
- main
|
2020-02-27 05:07:09 +03:00
|
|
|
jobs:
|
|
|
|
- nightly_job
|
2020-03-14 07:46:45 +03:00
|
|
|
|
2021-09-29 02:26:08 +03:00
|
|
|
- build_npm_package:
|
2020-03-14 07:46:45 +03:00
|
|
|
publish_npm_args: --nightly
|