Adding Continuous Integration to my Project

bregwin

Bregwin Jogi

Posted on November 16, 2024

Adding Continuous Integration to my Project

This week, I implemented continuous integration (CI) for my GitHub project, RefactorCode. Since the code is hosted on GitHub, I decided to use GitHub Actions for this purpose. My goal was to ensure that all tests run automatically on every push to the repository. This way, I could prevent breaking changes and keep the application more stable.

Setting Up CI with GitHub Actions

I had already set up testing with Jest last week, so this week’s task was to configure GitHub Actions to run tests in each push to the repo. I used a preconfigured GitHub Actions workflow, which allowed me to run the tests as well as run ESLint.

Image description

After setting it up, I verified that tests were executed automatically on every push. This setup gives me peace of mind because I no longer have to worry about breaking existing features when making multiple changes.

Image description

Collaborating with another Student

I also worked on tests for a project by another student, Vinh, called Barrierless (great name, by the way) which translates text files into different languages. My contribution was adding tests to check whether the command-line arguments such as setting options for model type, AI provider, and output file worked as expected.

In return, Vinh added some test cases to my project as well.

Takeaways

Adding CI to RefactorCode was a much-needed improvement that improves the stability and reduces bugs in the project. Working on another person’s project was also a great experience, as it gave me more info about how their code was set up and helped me write better test cases.

Overall, this week’s updates made both projects more reliable and was a fun learning experience.

💖 💪 🙅 🚩
bregwin
Bregwin Jogi

Posted on November 16, 2024

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

Sign up to receive the latest update from our blog.

Related