DEV Community

Hung Nguyen
Hung Nguyen

Posted on

CI test for OSD600-SSG

Overviews

After creating test for the tool, this week I have a chance to approach GitHub Action CI Workflow. With this, my future contributors who would like to push or merge their branches with me must pass the tests that I created.

Set up

  • In your Github site, choose "Actions"
  • Choose you Workflows options. I chose Node.js By GitHub Actions. And Click "set up this workflow"
  • Then a node.js.yml will be created then you can modify it, then commit the change. Here is the yml file Image description # Testing with partner Jun Song was my partner before, and now he and I will work for this CI test. But at first, I created my own testing branch and wrote a test. Then I sent a PR to my own project to make sure the CI work. Jun then send me another PR from him and everything was perfect, the Github CI was working and it showed him what to fix. And looks like we had the same workflows, testing with Jest and ESLint only. Writing a test for Jun's project was interesting, but there was also a big challenge. His functions were quite big and not combined from smaller functions. So in order to write the best test, I need to understand the output of function clearly. #Thought about CI test This would be helpful for me and my tool. This will automatically do the test for me and my future contributors in case they forget whenever they push or create a pull request.

Link

Repo: https://github.com/nguyenhung15913/OSD600-SSG
My Own PR: https://github.com/nguyenhung15913/OSD600-SSG/pull/22
PR to Jun: https://github.com/juuuuuuun/jun-ssg/pull/20

Top comments (0)