This project uses git-flow.
The master branch is reserved to releases: the development process occurs on
develop and feature branches. Please never commit to master.
-
Fork the repository
-
Clone your fork to a local repository:
$ git clone https://github.com/you/expected.git $ cd expected -
Add the main repository as a remote:
$ git remote add upstream https://github.com/jpc/expected.git -
Checkout to
develop:$ git checkout develop
-
Install an Elixir environment.
-
Fetch the project dependencies and build the project:
$ cd expected $ mix do deps.get, compile -
Launch the tests:
$ mix test
All the tests should pass.
To make a change, please follow this workflow:
-
Checkout to
developand apply the last upstream changes (use rebase, not merge!):$ git checkout develop $ git fetch --all --prune $ git rebase upstream/develop -
Create a new branch with an explicit name:
$ git checkout -b <my_branch> -
Work on your feature (don’t forget to write tests; you can check your coverage with
mix coveralls.htmland opencover/excoveralls.html):# Some work $ git commit -am "My first change" # Some work $ git commit -am "My second change" ... -
When your feature is ready, feel free to use interactive rebase so your history looks clean and is easy to follow. Then, apply the last upstream changes on
developto prepare integration:$ git checkout develop $ git fetch --all --prune $ git rebase upstream/develop -
If there were commits on
developsince the beginning of your feature branch, integrate them by rebasing:$ git checkout <my_feature_branch> $ git rebase develop -
Run the tests and static analyzers to ensure there is no regression and all works as expected:
$ mix test $ mix dialyzer $ mix credo -
If it’s all good, open a pull request to merge your branch into the
developbranch on the main repository.
Please format your code with mix format or your editor and follow
this style guide.