OSD600: Adding CI to Siteit

tdaw

TD

Posted on November 26, 2022

OSD600: Adding CI to Siteit

Overview

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.

💖 💪 🙅 🚩
tdaw
TD

Posted on November 26, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

OSD600: Adding CI to Siteit
opensource OSD600: Adding CI to Siteit

November 26, 2022