Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Learn about Continuous Integration #7

Closed
smiths opened this issue May 2, 2022 · 2 comments
Closed

Learn about Continuous Integration #7

smiths opened this issue May 2, 2022 · 2 comments
Assignees

Comments

@smiths
Copy link
Owner

smiths commented May 2, 2022

No description provided.

@EmilSoleymani
Copy link
Collaborator

Relevant Videos Used For Research

Infrequent Integration

Imagine a scenario where multiple developers are working on adding their own features to some existing code. Each developer could make their own changes to different files, many of which could be conflicting. For example, one developer modifies line 47, while the other completely deletes it. When attempting to merge these developers work, there will be a merge conflict. This scenario could occur with code spanning many files, and with code dating back months or even years. This situation is known as merge hell and it must be avoided.

Solution: Continuous Integration

Continuous Integration

With continuous integration, each developer frequently commits their changes, and before working on anything new makes sure they are working with the most recent version of the project. This way, when developer 1 deletes line 47, develop 2 knows that it is not there and acts accordingly. Thus, we can say continuous integration helps avoid merge hell. However, this could lead to many bugs and errors, thus continuous testing is also needed. With continuous testing there are automated unit tests with each commit, and the whole team is alerted if any issue should arise. Git Actions can help with automated testing:

name: Automated testing example
on:
   push:
      branches:
          -master

jobs:
    DO STUFF

Automates tasks specified under jobs every time a push is made to master branch

@smiths
Copy link
Owner Author

smiths commented May 2, 2022

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants