mirror of
https://github.com/apache/superset.git
synced 2026-05-22 00:05:15 +00:00
feat(docker/ci): migrate Docker and CI from npm to bun
Docker changes: - Use oven/bun:1-debian as base image instead of node:20-trixie-slim - Replace npm ci with bun install --frozen-lockfile - Replace npm run commands with bun run - Mount bun.lock instead of package-lock.json - Update cache paths for Bun's cache directory - Rename NPM_RUN_PRUNE env var to BUN_RUN_PRUNE CI workflow changes: - Update bashlib.sh npm-install function to use bun - Update superset-frontend.yml to use bun run commands - Update release.yml to use setup-bun action and changesets - Update superset-e2e.yml to use setup-bun action - Update superset-playwright.yml to use setup-bun action - Update superset-translations.yml to use setup-bun action Note: superset-embedded-sdk and superset-websocket remain on npm as they are separate packages with their own lockfiles. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
39
.github/workflows/release.yml
vendored
39
.github/workflows/release.yml
vendored
@@ -40,48 +40,33 @@ jobs:
|
||||
git fetch --prune --unshallow
|
||||
git tag -d `git tag | grep -E '^trigger-'`
|
||||
|
||||
- name: Install Node.js
|
||||
- name: Install Bun
|
||||
if: env.HAS_TAGS
|
||||
uses: actions/setup-node@v6
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
node-version-file: './superset-frontend/.nvmrc'
|
||||
bun-version: latest
|
||||
|
||||
- name: Cache npm
|
||||
- name: Cache bun
|
||||
if: env.HAS_TAGS
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.OS }}-node-
|
||||
${{ runner.OS }}-
|
||||
|
||||
- name: Get npm cache directory path
|
||||
if: env.HAS_TAGS
|
||||
id: npm-cache-dir-path
|
||||
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
|
||||
- name: Cache npm
|
||||
if: env.HAS_TAGS
|
||||
uses: actions/cache@v5
|
||||
id: npm-cache # use this to check for `cache-hit` (`steps.npm-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-npm-
|
||||
${{ runner.os }}-bun-
|
||||
|
||||
- name: Install dependencies
|
||||
if: env.HAS_TAGS
|
||||
working-directory: ./superset-frontend
|
||||
run: npm ci
|
||||
run: bun install --frozen-lockfile
|
||||
- name: Run unit tests
|
||||
if: env.HAS_TAGS
|
||||
working-directory: ./superset-frontend
|
||||
run: npm run test -- plugins packages
|
||||
run: bun run test -- plugins packages
|
||||
- name: Build packages
|
||||
if: env.HAS_TAGS
|
||||
working-directory: ./superset-frontend
|
||||
run: npm run plugins:build
|
||||
run: bun run turbo:build
|
||||
|
||||
- name: Configure npm and git
|
||||
if: env.HAS_TAGS
|
||||
@@ -96,12 +81,12 @@ jobs:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Bump version and publish package(s)
|
||||
- name: Publish packages with changesets
|
||||
if: env.HAS_TAGS
|
||||
working-directory: ./superset-frontend
|
||||
run: |
|
||||
git tag -d `git tag | grep -E '^trigger-'`
|
||||
npm run plugins:release-from-tag
|
||||
bun run changeset:publish
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
Reference in New Issue
Block a user