DEV Community

Rudy Chung
Rudy Chung

Posted on

OSD600 Lab 9

Setting up CI using GitHub Actions

This week, I set up CI for my SSG project. This involves creating a GitHub workflow for GitHub Actions to use. I started with one of the starter workflows. Specifically I used the msbuild one. To give a brief explanation of what adding this file will do, upon pushing changes or, a pull request it will create an environment that can be used to run my program. This is helpful if any tests, or other checks need to be made to verify that everything is in working order after changes to the project have been made.

My YAML file

My YAML file built the project on Windows and used my .sln file to build the project. Then, it ran the tests for my project using the built executable file. Other tasks such as using a linter to check the source code could also be performed at this point in order to validate it further.

Testing another project

How did your partner's repo and testing setup differ from yours?
I worked with sfrunza13 once again on his SSG. Even though he used Python and I used C++ for our projects, the tests were similar since they both accomplish the same task. With the understanding of the task being performed, the difference between languages did not matter significantly. Both the projects and tests were very similar. Although one significant difference was that my repo outsourced the Markdown parsing to a external module.

It was very simple to create new tests when using the existing tests as an example. Since I am still not 100% familiar with Python, it took me a little getting used to before writing my tests. However, I had worked with a previous iteration of the project before, so I did have prior understanding of how it functioned. But, there were some changes made to it in the time between the last time I worked on it and now that I had to re-read and understand the changes made to the project.

My opinion on CI

It's a very convenient way of handling contributions to my project. I can see it being very helpful in larger projects, which may get hundreds of pull requests. They would help greatly in ensuring that changes being merged do not break the project. The powerful thing about CI is that all these checks are done automatically, which greatly eases the burden of the authors and contributors of the project in terms of checking incoming changes.

Top comments (0)