Skip to content

ci: Migrate from CircleCI to GitHub Actions#7754

Open
camdecoster wants to merge 20 commits intomasterfrom
cam/7732/migrate-from-cci-to-gha-2
Open

ci: Migrate from CircleCI to GitHub Actions#7754
camdecoster wants to merge 20 commits intomasterfrom
cam/7732/migrate-from-cci-to-gha-2

Conversation

@camdecoster
Copy link
Copy Markdown
Contributor

@camdecoster camdecoster commented Apr 14, 2026

Description

Migrate automated testing from CircleCI to GitHub Actions.

Closes #7732.

Changes

  • Moves fonts, scripts from .circleci to .github
  • Adds GH CI workflow, removes old noCI workflow (which is now in the CI workflow)
  • Adds composite actions
  • Adds sharding script to approximate CCI sharding
  • Update baseline images (including new baselines specifically for virtual-webgl)
  • Remove prefix in image mocks, baselines
  • Increase viewport size in Karma tests
  • Update tests for changes in test environment
  • Refactor some scripts

Testing

  • Look at the CI results

Notes

  • This is version 2 of this PR. The original is ci: Migrate from CircleCI to GitHub Actions (old version) #7738, but that became the victim of scope creep.
  • There are some changes to expected values in tests. I'm attributing all of these to changes in the test environment.
  • A follow up PR will start using Kaleido v1 for image generation
  • There's more that can be done to simplify the workflow, but this gets us off CCI

@camdecoster camdecoster marked this pull request as ready for review April 14, 2026 19:07
Comment thread .circleci/download_google_fonts.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@camdecoster It might be a good idea to keep this script, as a record of the source of these font files.

Comment thread .github/actions/setup-chrome/action.yml Outdated
runs:
using: 'composite'
steps:
- uses: browser-actions/setup-chrome@v2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pin to commit hash

runs:
using: 'composite'
steps:
- uses: actions/setup-python@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pin to commit hash

@emilykl
Copy link
Copy Markdown
Contributor

emilykl commented Apr 14, 2026

@camdecoster Something to consider (as discussed): Using separate baseline images for the virtual-webgl image tests will make it hard to notice if those images diverge from the 'normal' baseline images.

Comment on lines +1147 to +1157
const handler = (d) => {
Lib.clearThrottle();
const isNode = d.points[0].hasOwnProperty('sourceLinks');
const isExpectedType = (elType === 'node') ? isNode : !isNode;
if (!isExpectedType) {
gd.once(eventType, handler);
return;
}
resolve(d);
});
}
gd.once(eventType, handler);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@camdecoster Can you explain this change? I can't quite get my head around it.

Comment on lines +1495 to +1496
expect(newPosition.x).toBeCloseTo(pos[0], -1, 'x position ' + msg);
expect(newPosition.y).toBeCloseTo(pos[1], -1, 'y position ' + msg);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a little surprised this change is needed, since I would expect the initial position to match even if the position after drag is a little different. How many pixels off is it?

Comment on lines +2659 to +2660
[0, 191, 'Personnel expenses'],
[0, 179, 'Other expenses'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A little surprised by this one as well... two additional points selected seems like a significant change, more than just a slight pixel difference. I'm curious what the cause is. I realize it might not be a good use of time to dig too deeply into this one though.

@@ -2705,13 +2707,14 @@ describe('Test select box and lasso per trace:', function() {
assertPoints([
[0, 331.5, 'Author: etpinard'],
[1, 53.5, 'Pull requests'],
[1, 15.5, 'Author: etpinard'],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Likewise, the points are spaced far enough apart on this one that I'm surprised by the change.

Comment thread .github/workflows/ci.yml
- name: Build dist/
run: npm run build

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like this gives us a link to download an archive of the entire dist/ folder, but not a direct link to the plotly.js bundle (the type of link we'd need to use in a codepen for example).

Could you look into how complicated it is to upload an artifact and link to it directly? I realize GHA has different limitations on artifacts than CircleCI. But I think we do need some kind of solution for linking directly to the plotly.js file generated by this job, since we use that so heavily in our dev process.

Comment thread .github/workflows/ci.yml
Comment on lines +591 to +601
- name: Pack tarball
run: |
npm pack
version=$(node --eval "console.log(require('./package.json').version)")
mv plotly.js-$version.tgz plotly.js.tgz

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: tarball-node18
retention-days: 7
path: plotly.js.tgz
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I realize these steps are taken directly from the CircleCI workflow but I'm not sure if they're actually needed. Maybe we can remove?

Comment thread .github/workflows/ci.yml
path: stackgl_modules/index.js

test-topojson-build:
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this mean "run only if triggered by push to default branch" ?

@@ -0,0 +1,25 @@
name: 'Setup Chrome'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I like these custom actions for reusing configs. 👍

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.

Migrate from CircleCI to GitHub Actions for CI

3 participants