diff options
author | 2023-05-25 18:39:00 +0200 | |
---|---|---|
committer | 2023-05-25 18:39:00 +0200 | |
commit | 681486f84ff81c4b966074e67ca4aac58711571c (patch) | |
tree | accd078ce341c9b9334eddcb807930186470582b | |
parent | [bugfix/docs] Fix clear notifications API docs (#1831) (diff) | |
download | gotosocial-681486f84ff81c4b966074e67ca4aac58711571c.tar.xz |
[docs]: semaphone ref & DEBUG usage for standalone testing (#1828)
* Point to semaphore for local testing
* Use `DEBUG=1` when running the testrig
* Provide an approach for install yarn
Co-authored-by: decentral1se <cellarspoon@riseup.net>
-rw-r--r-- | CONTRIBUTING.md | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a706119e5..a3d705af6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ These contribution guidelines were adapted from / inspired by those of Gitea (ht - [Finding your way around the code](#finding-your-way-around-the-code) - [Style / Linting / Formatting](#style--linting--formatting) - [Testing](#testing) - - [Standalone Testrig with Pinafore](#standalone-testrig-with-pinafore) + - [Standalone Testrig with Semaphore](#standalone-testrig-with-semaphore) - [Running automated tests](#running-automated-tests) - [SQLite](#sqlite) - [Postgres](#postgres) @@ -222,6 +222,8 @@ GoToSocial uses Gin templates in the `web/template` folder. Static assets are st To bundle changes, you need [Node.js](https://nodejs.org/en/download/) and [Yarn](https://classic.yarnpkg.com/en/docs/install). +Using [NVM](https://github.com/nvm-sh/nvm) is one convenient way to install them which also supports managing different Node versions. + To install Yarn dependencies: ```bash @@ -370,25 +372,26 @@ GoToSocial provides a [testrig](https://github.com/superseriousbusiness/gotosoci One thing that *isn't* mocked is the Database interface because it's just easier to use an in-memory SQLite database than to mock everything out. -#### Standalone Testrig with Pinafore +#### Standalone Testrig with Semaphore -You can launch a testrig as a standalone server running at localhost, which you can connect to using something like [Pinafore](https://github.com/nolanlawson/pinafore). +You can launch a testrig as a standalone server running at localhost, which you can connect to using something like [Semaphore](https://github.com/NickColley/semaphore/). -To do this, first build the gotosocial binary with `./scripts/build.sh`. +To do this, first build the gotosocial binary with `DEBUG=1 ./scripts/build.sh`. -Then, launch the testrig by invoking the binary as follows: +Then, launch the testrig with the `DEBUG` environment variable set by invoking the binary as follows: ```bash -./gotosocial testrig start +DEBUG=1 ./gotosocial testrig start ``` -To run Pinafore locally in dev mode, first clone the [Pinafore](https://github.com/nolanlawson/pinafore) repository, and then run the following command in the cloned directory: +To run Semaphore locally in dev mode, first clone the [Semaphore](https://github.com/NickColley/semaphore/) repository, and then run the following commands in the cloned directory: ```bash +yarn # install dependencies yarn run dev ``` -The Pinafore instance will start running on `localhost:4002`. +The Semaphore instance will start running on `localhost:4002`. To connect to the testrig, navigate to `http://localhost:4002` and enter your instance name as `localhost:8080`. |