-
-
Notifications
You must be signed in to change notification settings - Fork 2k
ci: Migrate from CircleCI to GitHub Actions #7754
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
Open
camdecoster
wants to merge
20
commits into
master
Choose a base branch
from
cam/7732/migrate-from-cci-to-gha-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7fb87e0
Move fonts folder
camdecoster deca8dc
Move scripts
camdecoster 2efa0d8
Add GH folder to Biome config
camdecoster 3554a61
Split USA choropleths into two mocks
camdecoster 62a8c26
Increase CI browser window size
camdecoster 8c00864
Add sharding script
camdecoster db2cf3f
Add composite actions
camdecoster b5e862f
Update image comparison script
camdecoster e817a04
Refactor mock test script and add multi-threading
camdecoster 4c29f84
Add GHA workflow for CI
camdecoster 621e272
Remove obsolete CI workflows
camdecoster fbf9a2b
Remove baseline image prefix
camdecoster 0949c23
Update/refactor tests for new CI
camdecoster d14b701
Add missing execute permissions
camdecoster eb5ecd1
Linting/formatting
camdecoster 6aafd12
Update image baselines
camdecoster d6928f9
Refactor image generation scripts
camdecoster b0348e9
Add virtual-webgl specific baseline images
camdecoster 38bf120
Pin third party actions to commit hashes
camdecoster 7dd54cb
Pin third party actions to commit hashes in composite actions
camdecoster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: 'Run with Xvfb' | ||
| description: 'Run a command under Xvfb with a preconfigured screen size' | ||
|
|
||
| inputs: | ||
| run: | ||
| description: 'Command to execute' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" ${{ inputs.run }} | ||
| shell: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: 'Setup Chrome' | ||
| description: 'Install Chrome and set CHROME_BIN environment variable' | ||
|
|
||
| inputs: | ||
| chrome-version: | ||
| description: 'Chrome version to install' | ||
| default: '136.0.7103.113' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - uses: browser-actions/setup-chrome@4f8e94349a351df0f048634f25fec36c3c91eded # v2 | ||
| id: setup-chrome | ||
| with: | ||
| chrome-version: ${{ inputs.chrome-version }} | ||
|
|
||
| - name: Set Chrome binary path | ||
| run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV | ||
| shell: bash | ||
|
|
||
| - name: Verify Chrome version | ||
| run: | | ||
| echo "Chrome path: $CHROME_BIN" | ||
| $CHROME_BIN --version | ||
| shell: bash | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: 'Setup Image Environment' | ||
| description: 'Setup Python, uv, and install Kaleido/plotly with required fonts' | ||
|
|
||
| inputs: | ||
| python-version: | ||
| description: 'Python version to use' | ||
| default: '3.12' | ||
| uv-version: | ||
| description: 'uv version to use' | ||
| default: '0.11.2' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | ||
| with: | ||
| python-version: ${{ inputs.python-version }} | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 | ||
| with: | ||
| version: ${{ inputs.uv-version }} | ||
|
|
||
| - name: Cache apt font packages | ||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | ||
| id: apt-cache | ||
| with: | ||
| path: ~/.cache/apt-fonts | ||
| key: apt-fonts-${{ runner.os }}-${{ hashFiles('.github/scripts/env_image.sh') }} | ||
|
|
||
| - name: Install Kaleido, plotly.io and required fonts | ||
| run: .github/scripts/env_image.sh | ||
| shell: bash | ||
| env: | ||
| APT_CACHE_HIT: ${{ steps.apt-cache.outputs.cache-hit }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: 'Setup Workspace' | ||
| description: 'Setup Node.js, install dependencies, and download build artifacts' | ||
|
|
||
| inputs: | ||
| node-version: | ||
| description: 'Node.js version to use' | ||
| default: '18' | ||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | ||
| with: | ||
| node-version: ${{ inputs.node-version }} | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
| shell: bash | ||
| env: | ||
| NODE_OPTIONS: '--max-old-space-size=4096' | ||
|
|
||
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | ||
| with: | ||
| name: build-output | ||
| path: . |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| APT_PACKAGES="fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji fontconfig" | ||
| APT_CACHE_DIR="${HOME}/.cache/apt-fonts" | ||
|
|
||
| if [ "$APT_CACHE_HIT" = "true" ] && [ -d "$APT_CACHE_DIR" ]; then | ||
| echo "Installing font packages from cache..." | ||
| sudo dpkg -i "$APT_CACHE_DIR"/*.deb 2>/dev/null || sudo apt-get install -yf | ||
| else | ||
| echo "Downloading and installing font packages..." | ||
| sudo apt-get update -q | ||
| sudo apt-get install -y --no-install-recommends $APT_PACKAGES | ||
| # Save debs for future cache | ||
| mkdir -p "$APT_CACHE_DIR" | ||
| for pkg in $APT_PACKAGES; do | ||
| cp /var/cache/apt/archives/${pkg}_*.deb "$APT_CACHE_DIR/" 2>/dev/null || true | ||
| done | ||
| fi | ||
|
|
||
| # Rebuild font cache | ||
| sudo fc-cache -f | ||
|
|
||
| # Install additional fonts (committed in .github/fonts/) | ||
| sudo cp -r .github/fonts/ /usr/share/ | ||
| sudo fc-cache -f | ||
|
|
||
| # Install Kaleido & Plotly | ||
| uv pip install --system kaleido==0.2.1 plotly==6.6.0 --no-progress | ||
|
|
||
| # Install numpy i.e. to convert arrays to typed arrays | ||
| uv pip install --system numpy==2.4.3 | ||
|
|
||
| # Verify version of python and versions of installed python packages | ||
| python --version | ||
| uv pip freeze --system |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| // Reads lines from stdin and emits only those where index % SHARD_TOTAL == SHARD_INDEX | ||
| // Environment variables SHARD_INDEX and SHARD_TOTAL must be set. | ||
|
|
||
| import { readFileSync } from 'fs'; | ||
|
|
||
| const lines = readFileSync('/dev/stdin', 'utf8').trim().split('\n').filter(Boolean); | ||
| const index = parseInt(process.env.SHARD_INDEX); | ||
| const total = parseInt(process.env.SHARD_TOTAL); | ||
|
|
||
| if (isNaN(index) || isNaN(total) || total <= 0) { | ||
| console.error('SHARD_INDEX and SHARD_TOTAL environment variables must be set to valid integers'); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| lines.forEach((line, i) => { | ||
| if (i % total === index) console.log(line); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.