Browse Source

Update docs

pull/2590/head
Rachael Booth 2 years ago
parent
commit
650ff1fe24
  1. 47
      docs/setup.md

47
docs/setup.md

@ -18,6 +18,8 @@ We recommend using [RBenv](https://github.com/rbenv/rbenv) to manage Ruby versio
We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS versions. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS versions.
## Pre-setup installation
1. Install PostgreSQL 1. Install PostgreSQL
macOS: macOS:
@ -95,7 +97,21 @@ We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS version
npm install --location=global yarn npm install --location=global yarn
``` ```
6. Clone the repo 6. (For running tests) Install Gecko Driver
Linux (Debian):
```bash
wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz
tar -xvzf geckodriver-v0.31.0-linux64.tar.gz
rm geckodriver-v0.31.0-linux64.tar.gz
chmod +x geckodriver
sudo mv geckodriver /usr/local/bin/
```
Also ensure you have firefox installed
7. Clone the repo
```bash ```bash
git clone https://github.com/communitiesuk/submit-social-housing-lettings-and-sales-data.git git clone https://github.com/communitiesuk/submit-social-housing-lettings-and-sales-data.git
@ -123,7 +139,11 @@ We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS version
bundle exec rake db:seed bundle exec rake db:seed
``` ```
5. Start the dev servers ## Running Locally
### Application
Start the dev servers
a. Using Foreman: a. Using Foreman:
@ -155,26 +175,25 @@ We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS version
The Rails server will start on <http://localhost:3000>. The Rails server will start on <http://localhost:3000>.
6. Install Gecko Driver ### Tests
Linux (Debian):
```bash ```bash
wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz bundle exec rspec
tar -xvzf geckodriver-v0.31.0-linux64.tar.gz
rm geckodriver-v0.31.0-linux64.tar.gz
chmod +x geckodriver
sudo mv geckodriver /usr/local/bin/
``` ```
Running the test suite (front end assets need to be built or server needs to be running): Or to run individual tests / files use your IDE
### Formatting
- `yarn prettier . --write` for scss, yml, md, and json files
- `yarn standard --fix` for js files
### Linting
```bash ```bash
bundle exec rspec bundle exec rake lint
``` ```
Note that these tests assume you have firefox installed.
## Using Docker ## Using Docker
1. Build the image: 1. Build the image:

Loading…
Cancel
Save