diff --git a/.github/workflows/test-action-local.yml b/.github/workflows/test-action-local.yml index ef426aa..73de655 100644 --- a/.github/workflows/test-action-local.yml +++ b/.github/workflows/test-action-local.yml @@ -15,14 +15,50 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + - name: Setup Bun uses: oven-sh/setup-bun@v1 with: bun-version: latest + - name: Install system dependencies for skia-canvas + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + libcairo2-dev \ + libpango1.0-dev \ + libjpeg-dev \ + libgif-dev \ + librsvg2-dev \ + libpixman-1-dev \ + pkg-config \ + python3 \ + make \ + g++ \ + libstdc++6 + - name: Install dependencies run: bun install + - name: Rebuild native modules + env: + NODE_ENV: production + SKIA_CANVAS_USE_SYSTEM_LIBRARIES: 1 + NODE_PATH: ${{ github.workspace }}/node_modules + run: | + # Try rebuilding with npm first, then bun + npm rebuild skia-canvas || bun rebuild skia-canvas + # Debug: Check what's in the skia-canvas directory + ls -la node_modules/skia-canvas/lib/classes/ + # Verify the module can be loaded + node -e "console.log('Testing skia-canvas import...'); require('skia-canvas'); console.log('✅ skia-canvas loaded successfully')" + - name: Build action run: bun run build