Skip to content

first release

first release #32

Workflow file for this run

name: Run Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/**'
env:
CARGO_NET_GIT_FETCH_WITH_CLI: 'true'
jobs:
ci:
strategy:
matrix:
node-version: [22, 24]
os: [ubuntu-latest]
runs-on: ${{matrix.os}}
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY }}
${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }}
${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }}
- name: Use supported Node.js Version
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Restore cached dependencies
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: node-modules-${{ hashFiles('package.json') }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Set private package config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Install dependencies
run: pnpm install
# TODO: remove when using published dependency
- name: Build python-node manually
run: |
# Configure git to use SSH host aliases for private repos (needed by cargo)
git config --global url."ssh://[email protected]/platformatic/http-handler".insteadOf "ssh://[email protected]/platformatic/http-handler"
git config --global url."ssh://[email protected]/platformatic/http-handler.git".insteadOf "ssh://[email protected]/platformatic/http-handler.git"
git config --global url."ssh://[email protected]/platformatic/http-rewriter".insteadOf "ssh://[email protected]/platformatic/http-rewriter"
git config --global url."ssh://[email protected]/platformatic/http-rewriter.git".insteadOf "ssh://[email protected]/platformatic/http-rewriter.git"
cd node_modules/@platformatic/python-node
pnpm install --ignore-scripts
pnpm run build
pnpm run build:wasm
pnpm run build:fix
- name: Install Python and dependencies
run: |
# Ensure Python and dev headers are available
sudo apt-get update
sudo apt-get install -y python3 python3-dev python3-pip gdb binutils
python3 --version
- name: Run Isolated Debug Test
run: |
# Enable verbose Node.js debugging and core dumps
export NODE_OPTIONS="--trace-warnings --trace-uncaught --trace-exit --max-old-space-size=4096"
export DEBUG="*"
ulimit -c unlimited
# Set up core dump pattern
echo '/tmp/core.%e.%p.%t' | sudo tee /proc/sys/kernel/core_pattern
# Show python-node module info
echo "Python-node module contents:"
ls -la node_modules/@platformatic/python-node/
# Show environment info
echo "Node.js version: $(node --version)"
echo "Python version: $(python3 --version)"
echo "Architecture: $(uname -m)"
echo "Kernel: $(uname -r)"
# Run isolated test with maximum verbosity
echo "Running isolated test..."
node --trace-warnings --trace-uncaught --trace-exit test/debug-isolated.js || echo "Test failed with exit code $?"
# Check for core dumps
echo "Checking for core dumps..."
ls -la /tmp/core.* 2>/dev/null || echo "No core dumps found"
- name: Upload crash dumps
if: failure()
uses: actions/upload-artifact@v4
with:
name: crash-dumps-${{ matrix.node-version }}-${{ matrix.os }}
path: /tmp/core.*
if-no-files-found: ignore
- name: Run Full Test Suite (if isolated test passes)
if: success()
run: pnpm test