summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md65
1 files changed, 32 insertions, 33 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 835317f..fecee0b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -25,24 +25,22 @@ git checkout -b 325-kill-sql-injections
25### 3. Get the test suite running 25### 3. Get the test suite running
26 26
27Just type `make coverage` or `make debug`, the testsuite should be run 27Just type `make coverage` or `make debug`, the testsuite should be run
28automatically. Please do add tests if you're fixing a bug or adding a new feature. 28automatically.
29 29
30#### Debugging failures in the test suite 30Please add tests if you're fixing a bug or adding a new feature: we do have a
31[high coverage](https://coveralls.io/github/nbs-system/snuffleupagus?branch=master)
32(functions, lines and branches), and intend to keep it that way.
33
34#### 3.3 Debugging failures in the test suite
31 35
32If your changes have introduced run-time failures in the test-suite, you can 36If your changes have introduced run-time failures in the test-suite, you can
33easily attach your debugger to analyse that particular test case by doing the 37easily troubleshoot them by inspecting the files that
34following: 38[php has generated](https://qa.php.net/write-test.php#analyzing-failing-tests)
35``` 39for this purpose.
36make debug 40
37cd src/ 41A nice trick is to edit the `.sh` file to prepend `gdb --args` to it before
38make test TESTS="-v --show-diff" 42launching it, in order to run the failing test inside GDB.
39```
40Adding the `-v` flag will provide more information (e.g. the full command used
41to run that particular test case), and `--show-diff` will (if the test case
42failed) show the difference between what was returned, and what was expected.
43 43
44If you'd like to see what other options are available for debugging test cases,
45you can add `-h` to the `TESTS` variable.
46 44
47### 4. Did you find a bug? 45### 4. Did you find a bug?
48 46
@@ -66,7 +64,7 @@ before committing, or even better, use a [pre-commit hook](https://github.com/an
66### 6. Make a Pull Request 64### 6. Make a Pull Request
67 65
68At this point, you should switch back to your master branch and make sure it's 66At this point, you should switch back to your master branch and make sure it's
69up to date with Active Admin's master branch: 67up to date with our upstream master branch:
70 68
71```sh 69```sh
72git remote add upstream git@github.com:nbs-system/snuffleupagus.git 70git remote add upstream git@github.com:nbs-system/snuffleupagus.git
@@ -84,12 +82,12 @@ git push --set-upstream origin 325-kill-sql-injections
84 82
85Finally, go to GitHub and [make a Pull Request](https://help.github.com/articles/creating-a-pull-request) :D 83Finally, go to GitHub and [make a Pull Request](https://help.github.com/articles/creating-a-pull-request) :D
86 84
87Travis CI will run our test suite against all supported PHP versions. We care 85Travis CI will [run our test suite](https://travis-ci.org/nbs-system/snuffleupagus)
88about quality, so your PR won't be merged until all tests pass. It's unlikely, 86against all supported PHP versions. We care about quality, so your PR won't be
89but it's possible that your changes pass tests in one PHP version but fail in 87merged until all tests pass. It's unlikely, but it's possible that your changes
90another. In that case, you'll have to setup your development environment 88pass tests in one PHP version but fail in another. In that case, you'll have to
91to use the problematic PHP version, and investigate 89setup your development environment to use the problematic PHP version, and
92what's going on! 90investigate what's going on!
93 91
94### 7. Keeping your Pull Request updated 92### 7. Keeping your Pull Request updated
95 93
@@ -109,27 +107,28 @@ git push --force-with-lease 325-kill-sql-injections
109 107
110A PR can only be merged into master by a maintainer if: 108A PR can only be merged into master by a maintainer if:
111 109
112* It is passing CI. 1101. It is passing CI.
113* It has been approved by at least two maintainers. If it was a maintainer who 1112. It has been approved by at least one maintainer. If it was a maintainer who
114 opened the PR, only one extra approval is needed. 112 opened the PR, only one extra approval is needed.
115* It has no requested changes. 1133. It has no requested changes.
116* It is up to date with current master. 1144. It is up to date with current master.
117 115
118Any maintainer is allowed to merge a PR if all of these conditions are 116Any maintainer is allowed to merge a PR if all of these conditions are met.
119met.
120 117
121### 9. Shipping a release (maintainers only) 118### 9. Shipping a release (maintainers only)
122 119
123Maintainers need to do the following to push out a release: 120Maintainers need to do the following to push out a release:
124 121
125* Make sure all pull requests are in and that changelog is current 1221. Make sure all pull requests are in and that changelog is current
126* Update `snuggleupagus.h` file and changelog with new version number 1232. Update `snuffleupagus.h` file and changelog with new version number
127* Create a stable branch for that release: 1243. Create a tag for that release:
128 125
129 ```sh 126 ```sh
130 git pull master 127 git checkout master
128 git pull origin master
131 make coverage 129 make coverage
132 git tag -s $MAJOR.$MINOR.$PATCH 130 git tag -s $MAJOR.$MINOR.$PATCH
133 git push --tags 131 git push --tags
134 ``` 132 ```
135* Do the *secret release dance* \ No newline at end of file 133
1344. Do the *secret release dance*