DEV Community

Cover image for OSD600: Adding CI to Siteit

Posted on • Updated on


OSD600: Adding CI to Siteit


For Lab 9, I was tasked with adding continuous integration to Siteit - an SSG tool that parses markdown and text files and renders results in HTML files.

I could have chosen other popular options, such as Travis CI, to integrate continuous integration, but since Siteit is already on GitHub, I decided to integrate CI using only GitHub Actions.

Initial Workflow

My initial workflow file was pretty simple, as I had one "build" job that did more than just building. It also ran linter, formatter, and unit tests. Everything seemed to work as expected until I looked at how my lab partner had integrated his CI workflow.

Making Improvements

My lab partner had sectioned jobs based on their purpose. This approach seemed more logical, and I realized I could improve my CI workflow without running all scripts as part of the build job. Therefore, I decided to refactor my workflow by adding the following jobs:

  • linter
  • formatter
  • tests

The job names implies the function of each job.
For instance, linter runs checks for linting errors using eslint and fixes them. On the other hand, formatter runs checks for formatting using prettier and corrects them. Finally, tests runs unit tests using the jest framework.

To view CI workflow implementation for Siteit, click here.

Final Thoughts

Implementing Continuous Integration using GitHub Actions was an overall fun experience. I got to familiarize myself with the YAML syntax and gain valuable experience using GitHub Actions.

Top comments (3)

szabgab profile image
Gabor Szabo

Nice. What is OSD600 and what is Lab 9 ?

Regarding the yaml file: Why do you restrict the work to the "master" branch?

tdaw profile image

Hey, sorry about the lack of information in this post.
I am currently a college student, and OSD600 is one of the courses I am taking this semester. This course helps us teach tools and techniques to become open-source developers and gets us involved in large projects. We were asked to add Continous Integration to our static site generator, which we all created as part of this course. Since master is my "main" branch and contains all the source code, I run CI tests on GitHub when a contributor tries to push code to the master branch.
Since it's my first try at integrating CI, I will improve my workflow implementation in subsequent commits.
Of course, tips and suggestions are always welcome.

szabgab profile image
Gabor Szabo

Do you mean this course?

How many hours of lecture and work is that?

I have been doing some similar work - organizing and leading meetups, hackathons - to get people to learn how to contribute to open source projects.
So I am very interested hearing about your experience and the experience of your fellow students.
What lectures did you hear? What projects were you working on? How was your experience? Are the lectures in-person or online?
Do you know what is the impact of this course on your success in finding job (your first job?) in the hi-tech world?

BTW do other students from the course post here on DEV? Would you want to encourage them?

Visualizing Promises and Async/Await 🤯

async await

☝️ Check out this all-time classic DEV post