Updated Contributing (markdown)

master
Hunter Long 2018-08-17 10:00:14 -07:00
parent a07a6130d4
commit ed7b64511e
1 changed files with 21 additions and 0 deletions

@ -1,8 +1,29 @@
Have a feature you want to implement into Statup!? Awesome! Follow this guide to see how you can test, compile and build Statup for production use. I recommend you use `make` with this process, it will save you time and it will auto include many customized parameters to get everything working correctly.
# Dependencies
Statup has a couple of required dependencies when testing and compiling the binary. The [Makefile](https://github.com/hunterlong/statup/blob/master/Makefile) will make these tasks a lot easier. Take a look at the Makefile to see what commands are ran. Run the command below to get setup right away.
```bash
make dev-deps
```
List of requirements for compiling assets, building binary, and testing.
- [Go Language](https://golang.org/) (currently `1.10.3`)
- [Docker](https://docs.docker.com/)
- [SASS](https://sass-lang.com/install)
- [Cypress](https://www.cypress.io/) (only used for UI testing, `make cypress-install`)
# Compiling Assets
This Golang project uses [rice](https://github.com/GeertJohan/go.rice) to compile static assets into a single file. The file `source/rice-box.go` is never committed to the Github repo, it is automatically created on build. Statup also requires `sass` to be installed on your local OS. To compile all the static assets run the command below:
```bash
make compile
```
After this is complete, you'll notice the `source/rice-box.go` file has been generated. You can now continue to build, and test.
# Testing
Statup includes multiple ways to Test the application, you can run the `make` command, or the normal `go test` command. To see the full experience of your updates, you can even run Cypress tests which is in the `.dev/test` folder.
Statup will run all tests in `cmd` folder on MySQL, Postgres, and SQLite databases. You can run `make databases` to automatically create MySQL and Postgres with Docker.
###### Go Unit Testing:
```bash
make test