Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_android_template to use build_npm_package #33068

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,20 +569,18 @@ jobs:
steps:
- checkout
- run_yarn
- attach_workspace:
at: .

- run:
name: Setup the Android Template
name: Create Android template project
command: |
REPO_ROOT=$(pwd)
PACKAGE=$(cat build/react-native-package-version)
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE"
cd template
# We replace the "react-native" dependency version with file:.. so we use it from source.
sed -i 's/\"react-native\"\:.*/\"react-native\"\: \"file\:\.\.\"/g' package.json
npm add $PATH_TO_PACKAGE
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
Expand Down Expand Up @@ -917,11 +915,6 @@ workflows:
- 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\/.*$/
- test_js:
run_disabled_tests: false
filters:
Expand All @@ -933,6 +926,8 @@ workflows:
branches:
ignore: gh-pages
- test_android_template:
requires:
- build_npm_package
filters:
branches:
ignore: gh-pages
Expand Down