Thursday 18 November 2021

Lab 9 - Adding Github Actions CI

Github Actions CI

 This week we are implementing Github Actions to our beloved Open source SSG project.

After watching David's videos, it was easier to just use the prebuilt node.js template from Github. We are on long term support for node version 16 so I felt there is no need to fiddle with older versions, because in a year or so they will be obsolate.  The documentation provided here is useful in understanding how to build and test Node.js applications.

The following shows my Github Actions code.

 

 Tests for Partner Repository

I made changes to Xiongye Jiang's repo, and pull request. I added the test for md file conversion to html for <hr> tag as a test case number six.  The following are my changes and Jest tests that i ran before commiting.

Thank you for reading.  Happy coding,

Eugene Chung

Release 3.0 - Review Pull Request

 Pull Request Review #1

At the point of reviewing this pull request, I was very new to Github CI, so I had to rely on the knowledge of others to help me.  At first I tried to use Docker and act-cli API to try to emulate what CI does in Github. This proves to be the more difficult route, so I was advised to test with the developer, Tracy.

The issue is to fix #13, creating Github Actions workflow for deployment.  I learned about secrets and different uses of environment variables as well as coding in CI.  After back and forth conversation with Duke, Tracy and Humphd, I get a sense that this is what Github colaboration is all about even though we are remotely situated.

I had Tracy demo her code for me on November 9th and produced the following screenshot.

issue-13_working_ycechung_Tracy

The code was eventualy deployed on vercel, but it might not be pushed at the end of release 0.3.

This also coordinates with my issue of building an index after the site is built.  I created an issue for this as #70.  This is part of development, not everything gets done in one issue and pull request.  It requires many revisions and linking to other issues if necessary.  I had a chance to actually review someone's code, which is exciting.


Pull Request Review #2:

The review for this pull request is straight forward.  Since I already am working and testing on the code base, I need to checkout his version of the code and make sure it does what it is required.  He made two changes which are adding a weekly schedule in Contents in docs/intro.md and adding a hyperlink of Weekly Schedule at the footer in docusaurus.config.js.  These are front-end changes that can be tested visually.  It was merged to repository on November 10, 2021. [4f58857]

Not all pull request end this nicely.  It is good to see two sides or perspectives to how code review can occur.

Conclusion to Release 0.3

Having worked on two pull requests and two code reviews, I feel like it was just the beginning of what it means to be an open source developer.  I look forward to release 0.4.

Eugene Chung

Release 3.0 #1 in Telescope

Introduction

 Having started in this course, the first thing that I came across was the infamous telescope project.  Unlike our static site generator, this is the third year and third major release of this Seneca made open source project.  I am impressed with the UI visuals of Telescope being built on top of Next.js, so I wanted to find an issue that deals with the front end.  This was a first step up from Hacktobefest issues with translation and documentation previously.  I was lucky to have found this issue and no one is fixing it.

The Change

The setup for Telescope is probably one of the harder parts of this issue, but it is well documented as I followed the contributor's documentation and environment setup document (option 2: Run frontend only).  The backend setup is a lot of work but my issue deals with the front-end so its extra work that I do not need to deal with.  In the future, I might have to work on even harder issues.

This issue deals with needing attribute target="_blank" added to the links with the logic already implemented.  I searched and found PostAvatar.tsx and PostInfo.tsx to make the changes.

 Other Tips

 It is important to follow linters and running required tests for every open source project.  I made sure all the tests pass before pushing my code.

image

I am glad I pushed some code onto Telescope and being part of the Open Source community at Seneca. 

Special thanks to Kevan Y. for pointing out this issue to me.

Cheers,

Eugene Chung

What I learned from Project 1 of Udacity's Data Science with Python bootcamp

Introduction As part of the project I completed successfully, I used SQL to explore a database related to movie rentals. SQL queries was ran...