github.com/jfrog/frogbot@v1.1.1-0.20231221090046-821a26f50338/CONTRIBUTING.md (about) 1 # 📖 Guidelines 2 3 - If the existing tests do not already cover your changes, please add tests. 4 - Pull requests should be created on the _dev_ branch. 5 - Please run `go fmt ./...` for formatting the code before submitting the pull request. 6 7 # ⚒️ Building and Testing the Sources 8 9 ## Build Frogbot 10 11 Make sure Go is installed by running: 12 13 ``` 14 go version 15 ``` 16 17 Clone the sources and CD to the root directory of the project: 18 19 ``` 20 git clone https://github.com/jfrog/frogbot.git 21 cd frogbot 22 ``` 23 24 Build the sources as follows: 25 26 On Unix based systems run: 27 28 ``` 29 ./buildscripts/build.sh 30 ``` 31 32 On Windows run: 33 34 ``` 35 .\buildscripts\build.bat 36 ``` 37 38 Once completed, you'll find the frogbot executable at the current directory. 39 40 ## Tests 41 42 Before running the tests, generate mocks by running the following command from within the root directory of the project: 43 44 ```sh 45 go generate ./... 46 ``` 47 48 To run the tests, follow these steps: 49 50 1. Set the `JF_URL` & `JF_ACCESS_TOKEN` environment variables with your JFrog platform credentials. 51 2. execute the following command: 52 53 ```sh 54 go test -v ./... 55 ```