So last week we added tests in my open source project. So this week we will be running these tests on every PR and commit we make and make sure that the new changes to be merged are not breaking anything. So how did we do this.
Github Actions
GitHub actions provides us smooth compatibility to run these using a yaml file that will be stored in the .github/workflows file. Added content in the file was not very difficult for me because I did a similar feature in . Besides the CI part, it was a learning curve for me because I had never made tests on python before. I kinda copied the syntax of what they had for the tests that were already there. I was able to see that my tests were passing when I raised the PR. The green check when a CI passes is always satisfying. I used Jest which is a popular javascript testing framework whereas they used something called pytest.
Conclusion
I think CI is very cool and makes our life easier. Now we dont have to download every branch and test is locally before merge the PR. That part is handled by github. This way reviewers can focus more on the main changes that were made in the PR. While I was researching about CI and github actions, I found out that we can add more cool stuff in our workflow like linting and deploying which would be very cool.
SOCIAL SHARE CARD GENERATOR