-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added instructions for running local xmtp server/unit tests locally (#…
…173) * Added instructions for running local xmtp server for testing unit tests on local emulators * Update example/README.md Co-authored-by: J-Ha <[email protected]> * Update example/README.md Co-authored-by: J-Ha <[email protected]> * Update example/README.md Co-authored-by: J-Ha <[email protected]> * Update example/README.md Co-authored-by: J-Ha <[email protected]> * Update example/README.md Co-authored-by: J-Ha <[email protected]> * Update example/README.md Co-authored-by: J-Ha <[email protected]> * Update example/README.md Co-authored-by: J-Ha <[email protected]> --------- Co-authored-by: Cameron Voell <[email protected]> Co-authored-by: J-Ha <[email protected]>
- Loading branch information
1 parent
8a3d762
commit cebc2d5
Showing
2 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# XMTP React Native example app | ||
|
||
This basic messaging app has an intentionally unopinionated UI to help make it easier for you to build with. | ||
|
||
## Run the example app | ||
Follow the [React Native guide](https://reactnative.dev/docs/environment-setup) to set up a CLI environment. | ||
|
||
To use the example app, run: | ||
|
||
```bash | ||
npm install | ||
cd example | ||
npm install --force | ||
npm run [ios or android] | ||
``` | ||
|
||
## Run example app unit tests on local emulators | ||
Running tests locally is useful when updating GitHub actions, or locally testing between changes. | ||
|
||
1. [Install Docker](https://docs.docker.com/get-docker/) | ||
|
||
2. Start a local XMTP server (from example directory) | ||
```bash | ||
docker-compose -p xmtp -f dev/local/docker-compose.yml up -d | ||
``` | ||
3. Verify the XMTP server is running | ||
```bash | ||
docker-compose ls | ||
NAME STATUS CONFIG FILES | ||
xmtp running(3) <REPO_DIRECTORY>/xmtp-react-native/example/dev/local/docker-compose.yml | ||
``` | ||
4. You can now run unit tests on your local emulators | ||
5. You can stop the XMTP server with the following command: | ||
```bash | ||
docker-compose -p xmtp -f dev/local/docker-compose.yml down | ||
``` |