From 9188e9575cab6f9bd7c9071c255bceb7708d9fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Tue, 10 Aug 2021 21:40:10 +0200 Subject: [PATCH] Build the initial React Native project in e2e tests (#13642) --- .github/workflows/ci.yml | 8 +++- scripts/integration-tests/e2e-react-native.sh | 39 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100755 scripts/integration-tests/e2e-react-native.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a325a2c3d..1ed05b08f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -423,7 +423,13 @@ jobs: strategy: fail-fast: false matrix: - project: [babel, babel-old-version, create-react-app, vue-cli, jest] + project: + - babel + - babel-old-version + - create-react-app + - vue-cli + - jest + - react-native steps: - name: Checkout code uses: actions/checkout@v2 diff --git a/scripts/integration-tests/e2e-react-native.sh b/scripts/integration-tests/e2e-react-native.sh new file mode 100755 index 0000000000..4571169eaf --- /dev/null +++ b/scripts/integration-tests/e2e-react-native.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +#==============================================================================# +# SETUP # +#==============================================================================# + +# Start in scripts/integration-tests/ even if run from root directory +cd "$(dirname "$0")" || exit +root="$PWD" + +source utils/local-registry.sh +source utils/cleanup.sh + +# Echo every command being executed +set -x + +#==============================================================================# +# ENVIRONMENT # +#==============================================================================# +node -v +npm --version +yarn --version + +#==============================================================================# +# TEST # +#==============================================================================# + +startLocalRegistry "$root"/verdaccio-config.yml + + +# Create a React Native project +cd /tmp +npx react-native init rnbabel +cd rnbabel + +# Build the project +npx react-native bundle --entry-file index.js --bundle-output output.js + +cleanup