Skip to content

ci: Migrate from CircleCI to GitHub Actions#7754

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

ci: Migrate from CircleCI to GitHub Actions#7754
camdecoster wants to merge 36 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added a markdown file with the font source info.

Comment thread .github/actions/setup-chrome/action.yml Outdated
Comment thread .github/actions/setup-image-env/action.yml Outdated
@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why, but the test 'should not output hover/unhover event data when node.hoverinfo is skip' was returning a hover event for a link, causing the test to fail. This handler ignores those events (when appropriate) to get the test to pass. As we discussed, I'll run these changes with/without the node event turned off and see if the test is actually working with this handler.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The viewport size needed to change for some tests to pass on GHA. That difference was enough that some of the other test results now changed. This is one such example.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is another example of the test results changing due to the viewport size change.

@@ -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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is another example of the test results changing due to the viewport size change.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/actions/setup-chrome/action.yml
Comment thread .github/workflows/ci.yml
NODE_VERSION: '18'

jobs:
detect-changes:
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.

Could the paths: argument be used instead of this job?

Comment thread .github/workflows/ci.yml
# Upload library uncompressed to allow for testing in REPLs
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
retention-days: 7
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.

Longer retention will make our lives easier I think, we can reduce it if it becomes a problem (not sure if there is a total storage limit?)

Suggested change
retention-days: 7
retention-days: 30

Comment thread .github/workflows/ci.yml
run: npm run build

# Upload library uncompressed to allow for testing in REPLs
- 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.

Add name to make it easier to find in the workflow results

Suggested change
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
name: Upload built plotly.js

Comment thread .github/workflows/ci.yml
echo "Download the baseline images from the artifacts of this workflow run."
echo "Add the new images to 'test/image/baselines/' and commit them to this pull request."

- 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.

Suggested change
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
name: Upload differing images

Comment thread CONTRIBUTING.md
Please note that image pixel comparison tests run on `ubuntu-latest` in GitHub Actions.
Therefore the final baselines may need updates.
This could simply be done by downloading the `baselines.tar` stored in the `ARTIFACTS` tab of `test-baselines` job (if the test failed).
This could simply be done by downloading the baseline images from the **Artifacts** section of the `test-baselines` job in the failed workflow run.
Copy link
Copy Markdown
Contributor

@emilykl emilykl Apr 16, 2026

Choose a reason for hiding this comment

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

Suggested change
This could simply be done by downloading the baseline images from the **Artifacts** section of the `test-baselines` job in the failed workflow run.
To use the images generated by the CI job directly, you can download the baseline images from the "Upload failing images" step of the `test-baselines` job in the failed workflow run.

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