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 co…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by TD

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.


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by TD


Print Share Comment Cite Upload Translate Updates
APA

TD | Sciencx (2022-11-26T23:08:52+00:00) OSD600: Adding CI to Siteit. Retrieved from https://www.scien.cx/2022/11/26/osd600-adding-ci-to-siteit/

MLA
" » OSD600: Adding CI to Siteit." TD | Sciencx - Saturday November 26, 2022, https://www.scien.cx/2022/11/26/osd600-adding-ci-to-siteit/
HARVARD
TD | Sciencx Saturday November 26, 2022 » OSD600: Adding CI to Siteit., viewed ,<https://www.scien.cx/2022/11/26/osd600-adding-ci-to-siteit/>
VANCOUVER
TD | Sciencx - » OSD600: Adding CI to Siteit. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/11/26/osd600-adding-ci-to-siteit/
CHICAGO
" » OSD600: Adding CI to Siteit." TD | Sciencx - Accessed . https://www.scien.cx/2022/11/26/osd600-adding-ci-to-siteit/
IEEE
" » OSD600: Adding CI to Siteit." TD | Sciencx [Online]. Available: https://www.scien.cx/2022/11/26/osd600-adding-ci-to-siteit/. [Accessed: ]
rf:citation
» OSD600: Adding CI to Siteit | TD | Sciencx | https://www.scien.cx/2022/11/26/osd600-adding-ci-to-siteit/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.