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

docs(readme): point build status image to new repo, improve formatting #112

Merged
merged 1 commit into from
Aug 11, 2020
Merged
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
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
**Table of Contents**
# FormSG

[![Build Status](https://travis-ci.com/opengovsg/formsg.svg?branch=release)](https://travis-ci.com/opengovsg/formsg)

## Table of Contents

- [FormSG](#formsg)
- [Table of Contents](#table-of-contents)
- [Local Development (Docker)](#local-development-docker)
- [Prerequisites](#prerequisites)
- [Running Locally](#running-locally)
- [Environment variables](#environment-variables)
- [Testing](#testing)
- [Prerequisites](#prerequisites-1)
- [Testing Prerequisites](#testing-prerequisites)
- [Running tests](#running-tests)
- [Unit tests](#unit-tests)
- [End-to-end tests](#end-to-end-tests)
- [Architecture](#architecture)
- [MongoDB Scripts](#mongodb-scripts)
- [Maintenance Banners](#maintenance-banners)
- [Contributing](#contributing)
- [Support](#support)

# FormSG

master: [![Build Status](https://travis-ci.com/datagovsg/formsg.svg?token=3iDBzqD5prSEyiedYGYi&branch=master)](https://travis-ci.com/datagovsg/formsg) release: [![Build Status](https://travis-ci.com/datagovsg/formsg.svg?token=3iDBzqD5prSEyiedYGYi&branch=release)](https://travis-ci.com/datagovsg/formsg)

## Local Development (Docker)

### Prerequisites
Expand All @@ -28,7 +31,7 @@ Install [docker and docker-compose](https://docs.docker.com/get-docker/).

Run

```
```bash
npm run dev
```

Expand All @@ -37,7 +40,7 @@ to build the Docker image from scratch. This will usually take 10 or so minutes.
If there have been no dependency changes in `package.json` or changes in the
root `server.js` file, you can run

```
```bash
docker-compose up
```

Expand Down Expand Up @@ -70,7 +73,7 @@ required values with your own.
The docker environment has not been configured to run tests. Thus, you will need
to follow the following local build guide to get tests running locally.

### Prerequisites
### Testing Prerequisites

The team uses macOS for development.

Expand All @@ -82,7 +85,7 @@ Make you sure have the following node version & package manager on your machine:

Run

```
```bash
nvm install 12.18.0
npm install
pip install "localstack[full]"
Expand All @@ -95,7 +98,7 @@ to install node modules and Localstack locally to be able to run tests. Note tha

#### Unit tests

```
```bash
npm run test
```

Expand All @@ -105,21 +108,21 @@ will build the backend and run both our backend and frontend unit tests. The tes

If the backend is already built, you can run

```
```bash
npm run test-ci
```

#### End-to-end tests

```
```bash
npm run test-e2e
```

will build both the frontend and backend then run our end-to-end tests. The tests are located at [`tests/end-to-end`](./tests/end-to-end). You will need to stop the Docker dev container to be able to run the end-to-end tests.

If you do not need to rebuild the frontend and backend, you can run

```
```bash
npm run test-e2e-ci
```

Expand Down