-
Notifications
You must be signed in to change notification settings - Fork 13
6. Development Workflow
- Go to Projects
- Find a task you are interested in and assign to your self
- Move task to
In progress
column when start to work on it - Pull last changes from
develop
branch - Create a new branch from
develop
following our branch naming convention (follow below) - Start writing code following our best practice (follow below), create tests if required from your changes
- Commit your changes and fix possible issues raised by linting tools
- Run tests and ensures they are all passing
- Build the project locally and ensures it doesn't fail
- Push your changes on a separate branch
- Create a Pull request against
develop
- Assign PR to your card in Projects board
- Wait for Pull Request approval or comments. Merge the branch once is approved.
- Merge branch with Squash merge option
- Move card in
Review
column [TO APPROVE] - Check your changes on staging [TO APPROVE]
- Once the tester will approve your changes, the changes will be merged to production and your code will be live! 🎉 [TO APPROVE]
Here you can find the current staging branch. Please review your code there once it gets merge in develop branch. Check all the possible part of the application that are involve in the merged changes. https://elliotforwaterstaging.azurewebsites.net
- Make small PRs as much as possible. Big Pr are difficult to review and to merge if the code keeps changing.
- Commit your work often, as we are multiple developers on the same project.
- Merge from
develop
as often as possible especially if working on a long running feature to help avoid large merge conflicts. - Try to review other pull requests when you can to improve understanding of the project, please comment on the code if you have a question or see an issue.
- Feel free to open a work-in-progress PR to start to get early feedbacks. You can append the prefix
[WIP]
to your PR so other devs knows it shouldn't be merged yet. - Each PR must have a test (if makes sense with the changes). A PR without test will not be approved.
- If you are working on UI component, a story for this UI element is expected in the PR in order to be approved.
A branch and commit message must have a meaningful name/title that describe which changes are applied. This is very important in the case we need to revert some changes, fix git history or extract a buggy commit.
Branch name must follow these conventions:
- feat: new feature
- fix: a bug fix or a quick fix to the code
- chore: Regular code maintenance
- refactor: code refactoring
i.e. feat-edit-profile-page
i.e. fix-undefined-empty-users-list
Same convention is used for git commits: <type>: <verb in present-tense> <rest of message (max 80 char)>
i.e. feat: fetch user data and display in profile page
Test are covered with Jest. you can run tests with npm run test
If you are working on test is better to run npm run test:watch
.
In this way each changes will be detected and the test will run again.
Unit Test are very welcome. Please use snapshots just when makes sense.