Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI work for nodejs part #1140

Merged
merged 1 commit into from
Dec 19, 2024
Merged

CI work for nodejs part #1140

merged 1 commit into from
Dec 19, 2024

Conversation

chance-sematic
Copy link
Member

@chance-sematic chance-sematic commented Dec 17, 2024

These are the CI steps for the following two items:

  • nodejs lint
  • nodejs unit tests using Cypress component testing

The Cypress e2e test is not yet included in this PR.

  1. The Cypress e2e test will have to mobilize headless browser engines, which requires several graphics libraries to be installed to the system. So we have two options for preparing the environment:

    A: use the default ubuntu distribution and install those graphic libraries or
    B: use the Cypress officially prepared docker image and install other toolchains (eg. make) as needed.

    For the sake of increasing the likelihood of running Cypress test suite successfully, I chose the latter.

  2. In order to reuse the installed Cypress executables (installed through npm install) I decided to cache the Cypress installation cache. Also I packaged the installed node_modules together with the code base. The cache (in the form of tar files) are passed over to the depending jobs. The successive jobs do not need to check the code out again.

  3. Another reason for tarring the files is because it preserves file permissions, otherwise with the default upload-artifact GH action, all file permission will be set to 644. This is noted here.

Copy link
Member

@augray augray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@chance-sematic chance-sematic added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit 3ffb487 Dec 19, 2024
10 checks passed
@chance-sematic chance-sematic deleted the c/ci branch December 19, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants