Skip to content

first release

first release #79

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'
GIT_SSH_COMMAND: 'ssh -o UserKnownHostsFile=/github/home/.ssh/known_hosts -o StrictHostKeyChecking=yes'
jobs:
ci:
name: CI - Node.js ${{ matrix.node-version }} & Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- '20'
- '22'
- '24'
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
# - '3.14-rc'
timeout-minutes: 25
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Install base packages
# run: |
# apt-get update
# apt-get install -y --no-install-recommends \
# bash \
# ca-certificates \
# curl \
# gnupg \
# git \
# openssh-client \
# build-essential \
# pkg-config \
# gdb \
# binutils
- name: Setup SSH Agent
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY }}
${{ secrets.HTTP_HANDLER_ACCESS_TOKEN }}
${{ secrets.HTTP_REWRITER_ACCESS_TOKEN }}
# - name: Trust internal SSH host aliases
# run: |
# mkdir -p ~/.ssh
# chmod 700 ~/.ssh
# touch ~/.ssh/known_hosts
# chmod 644 ~/.ssh/known_hosts
# KEY_ENTRY=$(ssh-keyscan github.com 2>/dev/null)
# echo "$KEY_ENTRY" >> ~/.ssh/known_hosts
# echo "$KEY_ENTRY" | sed 's/^github\.com\([[:space:]]\)/github.com-http-handler\1/' >> ~/.ssh/known_hosts
# echo "$KEY_ENTRY" | sed 's/^github\.com\([[:space:]]\)/github.com-http-rewriter\1/' >> ~/.ssh/known_hosts
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: node-modules-${{ hashFiles('package.json') }}
- 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: Configure Python ${{ matrix.python-version }}
# run: |
# python --version
# python -m ensurepip --upgrade
# python -m pip install --upgrade pip
# python -m pip --version
# echo "PYO3_PYTHON=$(which python)" >> $GITHUB_ENV
- name: Install dependencies
run: pnpm install
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
# - name: Install Rust toolchain
# run: |
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# 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://git@github.com-http-handler/platformatic/http-handler".insteadOf "ssh://git@github.com/platformatic/http-handler"
git config --global url."ssh://git@github.com-http-handler/platformatic/http-handler.git".insteadOf "ssh://git@github.com/platformatic/http-handler.git"
git config --global url."ssh://git@github.com-http-rewriter/platformatic/http-rewriter".insteadOf "ssh://git@github.com/platformatic/http-rewriter"
git config --global url."ssh://git@github.com-http-rewriter/platformatic/http-rewriter.git".insteadOf "ssh://git@github.com/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: Run Full Test Suite
shell: bash
run: pnpm test