mirror of https://github.com/statping/statping
Updated Contributing (markdown)
parent
3be878d07d
commit
a07a6130d4
|
@ -1,23 +1,39 @@
|
|||
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.
|
||||
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.
|
||||
|
||||
# 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.
|
||||
|
||||
###### Makefile Command:
|
||||
###### Go Unit Testing:
|
||||
```bash
|
||||
make test
|
||||
```
|
||||
|
||||
###### Cypress UI Testing:
|
||||
```bash
|
||||
make cypress-test
|
||||
```
|
||||
|
||||
###### Test Everything:
|
||||
```bash
|
||||
make test-all
|
||||
```
|
||||
###### Golang Command:
|
||||
```bash
|
||||
VERSION=0.44
|
||||
STATUP_DIR=`pwd`
|
||||
go test -v -p=1 -ldflags "-X main.VERSION=$(VERSION)" -coverprofile=coverage.out ./...
|
||||
```
|
||||
###### Cypress UI Testing:
|
||||
```bash
|
||||
cd .dev/test
|
||||
npm test
|
||||
```
|
||||
|
||||
# Build
|
||||
Statup will build on all operating systems except Windows 32-bit. I personally use [xgo](https://github.com/karalabe/xgo) to cross-compile on multiple systems using Docker. Follow the commands below to build on your local system.
|
||||
|
||||
###### Build for local operating system:
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
# Compile for Production
|
||||
Once you've tested and built locally, you can compile Statup for all available operating systems using the command below. This command will require you to have Docker.
|
||||
|
||||
```bash
|
||||
make build-all
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue