DEV Community

CDPhu
CDPhu

Posted on

Adding Continuous Integration

This week, we are going to have out Lab 9 in OSD600. Similar to the Lab 8, Lab 9 is about to improve our SSG within GitHub. We are doing so by implementing Continuous Integration or CI.
Continuous integration (CI) is the practice of automating the integration of code changes from multiple contributors into a single project. It's a key practice, allowing developers to frequently merge code changes into a central repository, where builds and tests are then run.

Procedure

Part 1
I have had practice using CI doe to one of my other classes that being CCP555. So I understood what I was doing for the most part. It didn't take long in all honesty, due to it being that GitHub does the majority of the work for you.

Though I was stuck on what to use for a while. Did I want to hardcode it automatically for the default branch using $default-branch or did I want it to run in my main branch (which is also my default). So I just opted to just usemain` as the branch within the CI.

In order to check whether this had worked or not, I decided to push split of my mdFileConverter() function into its own file. From there, I created several tests for it as well. I then pushed the new test files to see whether it would pass the CI lo and behold they passed without issue.

Part 2
Moreover, for this Lab 9 we need to test other people's CI as well. I found my partner Neil via Slack. Personally I didn't do much, I just created a test to test whether an parse was undefined or not, and one to see if her config file could parse one specific file and not a folder of files. I also used experience from a previous commit during release 0.3 where the owner was asking to create tests.

Thoughts

This lab overall, is a simple lab, though I would not call it a bad thing. With this lab it can be extremely useful, and an extremely powerful tool that can apply to a variety of situations. This allows programmers to build on one project simultaneously on a project while checking for any errors. An extremely versatile and useful tool to any programmers

Top comments (0)