Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c7956af
refactor ci
WilfredAlmeida Jan 22, 2026
57e0d31
fix tests, install musl dependencies
WilfredAlmeida Jan 21, 2026
fee23f6
ci, test fix
WilfredAlmeida Jan 21, 2026
4ac9333
fix ci
WilfredAlmeida Jan 21, 2026
1af9d84
run on correct targets
WilfredAlmeida Jan 21, 2026
eed55c5
modify triggers
WilfredAlmeida Jan 22, 2026
74adc28
add shell files for binary verification
WilfredAlmeida Jan 22, 2026
96c9bfc
chmod shell scripts
WilfredAlmeida Jan 22, 2026
1e676a5
fix test, validation
WilfredAlmeida Jan 22, 2026
e712173
test, binary validation fixes
WilfredAlmeida Jan 23, 2026
7f82320
ignore errors after exit
WilfredAlmeida Jan 23, 2026
5fc9aeb
test debnug
WilfredAlmeida Jan 23, 2026
a1b2e39
limited testing
WilfredAlmeida Jan 23, 2026
d9a017e
commit the correct file
WilfredAlmeida Jan 23, 2026
ec0d93a
run on macos-latest
WilfredAlmeida Jan 23, 2026
6faa604
fix: typo in runner name
WilfredAlmeida Jan 24, 2026
23431ec
fix rust install
WilfredAlmeida Jan 24, 2026
d079f4a
musl validation test should fail
WilfredAlmeida Jan 24, 2026
244fa71
fix musl test
WilfredAlmeida Jan 24, 2026
a03b248
set workflow permissions
WilfredAlmeida Jan 25, 2026
fe1f5e6
cargo clean napi builds to clear space
WilfredAlmeida Jan 25, 2026
fd14473
refactor: bump package versions
WilfredAlmeida Feb 2, 2026
af43df6
Updating test to run in public runner, updating task to consume less
Juanito87 Feb 2, 2026
64a858d
UPD.
Juanito87 Feb 2, 2026
549379e
Removing unneeded task as it has been moved to the public runner.
Juanito87 Feb 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
311 changes: 311 additions & 0 deletions .github/workflows/napi-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,311 @@
name: NAPI Integration Tests

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
paths:
- 'yellowstone-grpc-client-nodejs/**'
- '.github/workflows/napi-integration-tests.yml'
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
NODE_VERSION: '20.18.0'

jobs:
# Linux x64 GNU (glibc) - Ubuntu
test-linux-x64-gnu:
name: Test Linux x64 GNU (glibc)
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: yellowstone-grpc-client-nodejs/package-lock.json

- name: Set rust version
run: |
RUST_VERSION="$(grep -oP 'channel = "\K\d\.\d+\.\d+(?=")' rust-toolchain.toml)"
echo "RUST_STABLE=$RUST_VERSION" | tee -a $GITHUB_ENV

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_STABLE }}
targets: x86_64-unknown-linux-gnu

- name: Install system dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y build-essential protobuf-compiler libsasl2-dev

- name: Install Node dependencies
working-directory: yellowstone-grpc-client-nodejs
run: npm ci

- name: Build NAPI binary for linux-x64-gnu
working-directory: yellowstone-grpc-client-nodejs
env:
NAPI_TARGET: x86_64-unknown-linux-gnu
LIBC: gnu
run: |
npm run build -- --platform --release --target x86_64-unknown-linux-gnu

- name: Validate binary (GNU libc)
working-directory: yellowstone-grpc-client-nodejs
run: |
chmod u+x ../ci/validate-binary.sh
../ci/validate-binary.sh napi/yellowstone-grpc-napi.linux-x64-gnu.node gnu x86_64

- name: Build TypeScript SDK
working-directory: yellowstone-grpc-client-nodejs
run: npm run build:dev

- name: Run tests
working-directory: yellowstone-grpc-client-nodejs
env:
TEST_ENDPOINT: ${{ secrets.TEST_ENDPOINT }}
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
run: npm test

- name: cargo clean
working-directory: yellowstone-grpc-client-nodejs/napi
run:
cargo clean

# Linux x64 MUSL - Alpine container
test-linux-x64-musl:
Comment thread Fixed
name: Test Linux x64 MUSL (Alpine)
runs-on: ubuntu-22.04
container:
image: alpine:3.19
env:
HOME: /root

steps:
- name: Install build dependencies in Alpine
run: |
apk add --no-cache \
git \
bash \
sed \
nodejs \
npm \
python3 \
make \
g++ \
gcc \
musl-dev \
linux-headers \
protobuf-dev \
cyrus-sasl-dev \
curl \
file \
binutils

- name: Checkout repository
uses: actions/checkout@v4

- name: Set rust version (BusyBox compatible)
run: |
RUST_VERSION="$(sed -n 's/channel = "\([0-9]\+\.[0-9]\+\.[0-9]\+\)".*/\1/p' rust-toolchain.toml)"
echo "RUST_STABLE=$RUST_VERSION" | tee -a $GITHUB_ENV
echo "Rust version: $RUST_VERSION"

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_STABLE }}
targets: x86_64-unknown-linux-musl

- name: Verify Rust installation
run: |
echo "PATH: $PATH"
which rustc
rustc --version
which cargo
cargo --version

- name: Install Node dependencies
working-directory: yellowstone-grpc-client-nodejs
run: npm ci

- name: Build NAPI binary for linux-x64-musl
working-directory: yellowstone-grpc-client-nodejs
env:
NAPI_TARGET: x86_64-unknown-linux-musl
LIBC: musl
run: |
npm run build -- --platform --release --target x86_64-unknown-linux-musl

- name: Validate binary (MUSL libc)
working-directory: yellowstone-grpc-client-nodejs
run: |
chmod u+x ../ci/validate-binary.sh
../ci/validate-binary.sh napi/yellowstone-grpc-napi.linux-x64-musl.node musl x86_64

- name: Build TypeScript SDK
working-directory: yellowstone-grpc-client-nodejs
run: npm run build:dev

- name: Run tests
working-directory: yellowstone-grpc-client-nodejs
env:
TEST_ENDPOINT: ${{ secrets.TEST_ENDPOINT }}
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
run: npm test

- name: cargo clean
working-directory: yellowstone-grpc-client-nodejs/napi
run:
cargo clean

# macOS x64 (Intel)
test-macos-x64:
Comment thread Fixed
name: Test macOS x64 (Intel)
runs-on: macos-15-intel

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: yellowstone-grpc-client-nodejs/package-lock.json

- name: Set rust version
run: |
RUST_VERSION="$(sed -n 's/^channel = "\([0-9.]*\)"/\1/p' rust-toolchain.toml)"
echo "RUST_STABLE=$RUST_VERSION" | tee -a "$GITHUB_ENV"

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_STABLE }}
targets: x86_64-apple-darwin

- name: Install system dependencies
run: |
brew install protobuf

- name: Install Node dependencies
working-directory: yellowstone-grpc-client-nodejs
run: npm ci

- name: Build NAPI binary for darwin-x64
working-directory: yellowstone-grpc-client-nodejs
env:
NAPI_TARGET: x86_64-apple-darwin
run: |
npm run build -- --platform --release --target x86_64-apple-darwin

- name: Validate binary (macOS x64)
working-directory: yellowstone-grpc-client-nodejs
run: |
chmod u+x ../ci/validate-binary-macos.sh
../ci/validate-binary-macos.sh napi/yellowstone-grpc-napi.darwin-x64.node x86_64

- name: Build TypeScript SDK
working-directory: yellowstone-grpc-client-nodejs
run: npm run build:dev

- name: Run tests
working-directory: yellowstone-grpc-client-nodejs
env:
TEST_ENDPOINT: ${{ secrets.TEST_ENDPOINT }}
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
run: npm test

- name: cargo clean
working-directory: yellowstone-grpc-client-nodejs/napi
run:
cargo clean

# macOS ARM64 (Apple Silicon)
test-macos-arm64:
name: Test macOS ARM64 (Apple Silicon)
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: yellowstone-grpc-client-nodejs/package-lock.json

- name: Set rust version
run: |
RUST_VERSION="$(sed -n 's/^channel = "\([0-9.]*\)"/\1/p' rust-toolchain.toml)"
echo "RUST_STABLE=$RUST_VERSION" | tee -a "$GITHUB_ENV"

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_STABLE }}
targets: x86_64-apple-darwin

- name: Install system dependencies
run: |
brew install protobuf

- name: Install Node dependencies
working-directory: yellowstone-grpc-client-nodejs
run: npm ci

- name: Build NAPI binary for darwin-arm64
working-directory: yellowstone-grpc-client-nodejs
env:
NAPI_TARGET: aarch64-apple-darwin
run: |
npm run build -- --platform --release --target aarch64-apple-darwin

- name: Validate binary (macOS ARM64)
working-directory: yellowstone-grpc-client-nodejs
run: |
chmod u+x ../ci/validate-binary-macos.sh
../ci/validate-binary-macos.sh napi/yellowstone-grpc-napi.darwin-arm64.node arm64

- name: Build TypeScript SDK
working-directory: yellowstone-grpc-client-nodejs
run: npm run build:dev

- name: Run tests
working-directory: yellowstone-grpc-client-nodejs
env:
TEST_ENDPOINT: ${{ secrets.TEST_ENDPOINT }}
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
run: npm test

- name: cargo clean
working-directory: yellowstone-grpc-client-nodejs/napi
run:
cargo clean

# Release gate - all tests must pass
integration-tests-complete:
Comment thread Fixed
Comment thread Fixed
Comment thread Fixed
name: All Integration Tests Passed
needs: [test-linux-x64-gnu, test-linux-x64-musl, test-macos-x64, test-macos-arm64]
runs-on: ubuntu-latest
steps:
- name: Mark as complete
run: echo "All NAPI integration tests passed successfully"
Comment thread Fixed
Comment thread Fixed

18 changes: 8 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ["${{ matrix.os }}"]
os: [ubuntu-22.04]
runs-on:
group: Public
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
- uses: actions/checkout@v4
with:
root-reserve-mb: 4096
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
fetch-depth: 0

- uses: actions/checkout@v4
- name: Clear rust cache before creating it
run: |
cargo cache -r all

- uses: actions/cache@v4
with:
Expand Down
Loading
Loading