Skip to content

Commit

Permalink
Add Contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Jul 16, 2021
1 parent fb77804 commit dcd9e02
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/phpunit.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: test

on:
pull_request:
- push
- pull_request

jobs:
phpunit:
name: phpunit
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
php-version:
Expand Down
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/ICanBoogie/Inflector).

## Pull Requests

- **Code style** — We're following a [Coding Standard][]. Check the code style with `make lint`.
- **Code health** — We're using [PHPStan][] to analyse the code, with maximum scrutiny. Check the code with `make lint`.
- **Add tests!** — Your contribution won't be accepted if it doesn't have tests.
- **Document any change in behaviour** — Make sure the `README.md` and any other relevant documentation are kept
up-to-date.
- **Consider our release cycle** — We follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not
an option.
- **Create feature branches** — We won't pull from your main branch.
- **One pull request per feature** — If you want to do more than one thing, send multiple pull requests.
- **Send coherent history** — Make sure each individual commit in your pull request is meaningful. If you had to make
multiple intermediate commits while developing, please [squash them][git-squash] before submitting.

## Running Tests

We provide a Docker container for local development. Run `make test-container` to create a new session. Inside the
container run `make test` to run the test suite. Alternatively, run `make test-coverage` for a breakdown of the code
coverage. The coverage report is available in `build/coverage/index.html`.

**Thanks for your contribution**!


[Coding Standard]: phpcs.xml
[git-squash]: http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages
[PHPStan]: https://phpstan.org/user-guide/getting-started
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,15 @@ titleize("été_aux_âmes_inouïes"); // Été Aux Âmes Inouïes

The project is continuously tested by [GitHub actions](https://github.com/ICanBoogie/Common/actions).

[![Tests](https://github.com/ICanBoogie/Inflector/workflows/phpunit/badge.svg?branch=master)](https://github.com/ICanBoogie/Inflector/actions?query=workflow%3Aphpunit)
[![Tests](https://github.com/ICanBoogie/Inflector/workflows/test/badge.svg?branch=master)](https://github.com/ICanBoogie/Inflector/actions?query=workflow%3Atest)
[![Static Analysis](https://github.com/ICanBoogie/Inflector/workflows/static-analysis/badge.svg?branch=master)](https://github.com/ICanBoogie/Inflector/actions?query=workflow%3Astatic-analysis)
[![Code Style](https://github.com/ICanBoogie/Common/workflows/code-style/badge.svg?branch=master)](https://github.com/ICanBoogie/Inflector/actions?query=workflow%3Acode-style)



## Testing
## Contributing

The test suite is run with the `make test` command. [Composer](http://getcomposer.org/) is
automatically installed as well as all the dependencies required to run the suite. It is recommended
to run `make test` in the test container created with `make test-container`.

The package is continuously tested with [GitHub Actions](https://github.com/ICanBoogie/Inflector/actions/).
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.



Expand Down

0 comments on commit dcd9e02

Please sign in to comment.