-
Notifications
You must be signed in to change notification settings - Fork 70
refactor(ci): to not use circleci but only github #1936
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
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1936 +/- ##
=======================================
Coverage 97.76% 97.76%
=======================================
Files 147 147
Lines 4786 4786
Branches 1283 1283
=======================================
Hits 4679 4679
Misses 104 104
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the CI/CD configuration by removing CircleCI support and standardizing on GitHub Actions across the repository. Key changes include:
- Introducing a composite GitHub Action in .github/actions/ci/action.yml for dependency installation and Node.js setup.
- Creating new GitHub Actions workflows for quality checks and regression testing.
- Updating release workflows and documentation to reference GitHub Actions instead of CircleCI/Travis.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/actions/ci/action.yml | Adds a composite GitHub Action to install dependencies |
| .github/workflows/quality.yml | Adds a workflow for linting, type checking, and testing |
| .github/workflows/regression.yml | Adds a workflow for regression testing with multiple Node.js versions |
| docs/README.md | Updates CI badge from Travis CI to GitHub Actions |
| .github/workflows/release.yml | Refactors the release workflow to use the new composite action |
| docs/cli/csv-parser-price.md | Replaces Travis with GitHub Actions CI badge |
| docs/cli/csv-parser-orders.md | Replaces Travis with GitHub Actions CI badge |
| @@ -0,0 +1,22 @@ | |||
| name: CI | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is re-used among the actions.
| pull_request: | ||
|
|
||
| jobs: | ||
| linting: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We start with lining. So static analysis.
| - name: Lint | ||
| run: pnpm lint | ||
|
|
||
| type-checking: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type checking runs in parallel.
|
|
||
| testing: | ||
| name: Testing | ||
| needs: [linting, type-checking] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only test once our static analysis finished.
| - name: Integration tests | ||
| run: pnpm test:integration | ||
|
|
||
| regression-testing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We isolate out the integration tests. The idea is that we consider this regression testing. Where we run on the nvmrc's version of Node.js before. Then we test if our changes cause regressions on older versions of Node.js
| matrix: | ||
| version: [18, 20] | ||
| fail-fast: true | ||
| max-parallel: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is important. We run against one project in integration tests. We can't run in parallel.
| <p align="center"> | ||
| <a href="https://travis-ci.org/commercetools/nodejs"> | ||
| <img alt="Travis CI Status" src="https://img.shields.io/travis/commercetools/nodejs/master.svg?style=flat-square&label=travis"> | ||
| <a href="https://github.com/commercetools/nodejs/actions"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed. These were wrong for a long time.
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| version: [18, 20] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it will be better if we set this matrix to [20, 22], since 18 is now in maintenance mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We test 22 in the regular testing flow. That's defined in the .nvmrc and what we develop with. v18 is not EoL and we officially still support it. Hence I would argue to also regression test for it. If we drop it, we should officially do so using the engines field and a major release. Keep in mind that with the latest major release we require >= Node.js v18 - prior we said to support v12 even.
Hope this makes sense. In a nutshell: let's not release major and deprecate Node.js v18 support in a migration to GitHub Actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, this make sense.
ajimae
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merging now and cleaning up secrets in CircleCI. |
|
Thank you! sorry for the delay LGTM |
* refactor(ci): to not use circleci but only github * refactor: to have one regression job





Summary
This repository contains library code mainly. We settled on using GitHub Actions for these kind of repos. At the same time this repo already used GitHub Actions for releasing the library. In addition to using CircleCI for building, testing and linting. This duality of CI is not ideal and should be homogenized.
For this to work I imported credentials from CircleCI to GitHub. I also updated some very old documentation links I found.
One approved the branch protection will be updated. Then the CircleCI project delted.