Changes for page Continuous Integration
Last modified by chrisby on 2024/05/05 17:22
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,18 +1,19 @@ 1 - **Integrate code changeat leastonceaday.** This means that code changes on a featurebranch you are working on should be merged/integrated into the main branch,and main branch changesshould bemerged into the feature branch. For example,atthe beginning of the day1 +Code changes are integrated into the main branch several times a day. 2 2 3 3 ### Benefit 4 4 5 -** ManySmallIntegrationsAreCheaper**:andthelargerthedifferences between them become, the greater the risk of multiple integration conflicts. It is easier to fix small individual integration problems iteratively thanitis to fix multiple problems at once. Therefore, continuous integration has the advantage ofcatching integration problems early, when they are cheap to fix.5 +**Early Integration Is Cheaper**: The longer side branches wait to be merged into the main branch, the greater the risk of multiple integration conflicts. It is easier to fix small individual integration problems iteratively than to fix multiple problems at once. Therefore, continuous integration has the advantage of identifying integration problems early, when they are cheap to fix. 6 6 7 7 ### Guidelines 8 8 9 -* **Stable Code Only**: Just code that passes all tests shall be merged into the main branch. There are tactics for [[speeding up test execution|doc:Software Engineering.Testing.Test Speed up.WebHome]] to help ensure that this practice can be performed frequently. For example, it is common to run acceptance tests only once a day, at night, because they are so time-consuming, and to fix problems, if any, the next day. All other tests are much faster and can be run frequently during development.Thefaster,thebetter.9 +* **Stable Code Only**: Just code that passes all tests shall be merged into the main branch. There are tactics for [[speeding up test execution|doc:Software Engineering.Testing.Enhance Test Execution Speed.WebHome]] to help ensure that this practice can be performed frequently. For example, it is common to run acceptance tests only once a day, at night, because they are so time-consuming, and to fix problems, if any, the next day. All other tests are much faster and can be run frequently during development, taking a few minutes at most. 10 10 * **Incomplete Features Allowed**: It is normal for the main branch code to temporarily contain incomplete features. Feature toggles are a common pattern for turning off incomplete features through simple configuration. 11 11 * **Never cheat to make a failed pipeline/test suite pass**, e.g. by removing the failed tests. 12 12 13 13 ### Code Reviews 14 14 15 -Requesting and providing code reviews, as on GitHub or GitLab, is a convenient feature for making code reviews asynchronous and remotely available, but it is not the most time-efficient approach for agile teams that do not need these features. For th ose teams, it is better to maintain high quality code by following these practices:15 +Requesting and providing code reviews, as on GitHub or GitLab, is a convenient feature for making code reviews asynchronous and remotely available, but it is not the most time-efficient approach for agile teams that do not need these features. For these teams, it is better to maintain high quality code by following these agile practices: 16 16 17 17 * Code is properly tested, refactored and simplified. 18 -* Code is implicitly reviewed in real time by [[pairing up|doc:Software Engineering.Agile.Extreme Programming.Pair Programming.WebHome]] with technically experienced team members. 18 +* Code is implicitly reviewed by a second team member through pair programming. 19 +* Code review is done in real time by pairing with a technically experienced member just before integration into the main branch.