Skip to content

Bump apache-arrow from 17.0.0 to 18.1.0 #527

Bump apache-arrow from 17.0.0 to 18.1.0

Bump apache-arrow from 17.0.0 to 18.1.0 #527

Workflow file for this run

name: test
on:
pull_request:
branches:
- trunk
push:
branches:
- trunk
- release-*
tags:
- v*
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.version.os }}
strategy:
fail-fast: false
matrix:
version: [
{ os: 'ubuntu-latest', nodever: 18 },
{ os: 'ubuntu-latest', nodever: 20 },
{ os: 'ubuntu-latest', nodever: 22 },
{ os: 'macos-latest', nodever: 18 },
{ os: 'macos-latest', nodever: 20 },
{ os: 'macos-latest', nodever: 22 },
]
name: Test with spice runtime on ${{ matrix.version.os }} Node.JS ${{ matrix.version.nodever }}
steps:
- uses: actions/checkout@v4
- name: Set up NodeJS
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version.nodever }}
- name: Install requirements
run: |
yarn install
yarn build
- name: Install PostgreSQL (Linux)
if: matrix.version.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y postgresql
sudo service postgresql start
sleep 5
sudo -u postgres psql -tc "SELECT 1 FROM pg_roles WHERE rolname='postgres'" | grep -q 1 || sudo -u postgres createuser -s postgres
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
sudo -u postgres createdb testdb
- name: Install PostgreSQL (MacOS)
if: matrix.version.os == 'macos-latest'
run: |
brew install postgresql
brew services start postgresql
sleep 5
createuser -s postgres
psql -d postgres -c "ALTER USER postgres PASSWORD 'postgres';"
createdb testdb
- name: Wait for PostgreSQL to start
run: sleep 5
- name: Check PostgreSQL
env:
PGPASSWORD: postgres
run: psql -h localhost -U postgres -c 'SELECT version();'
- name: Prepare PostgreSQL dataset
env:
PGPASSWORD: postgres
run: |
psql -h localhost -U postgres -d testdb < test/scripts/setup-data-postgresql.sql
psql -h localhost -U postgres -d testdb -c 'SELECT * FROM test_postgresql_table;'
- name: Install Spice (https://install.spiceai.org) (Linux)
if: matrix.version.os == 'ubuntu-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl https://install.spiceai.org | /bin/bash
echo "$HOME/.spice/bin" >> $GITHUB_PATH
$HOME/.spice/bin/spice install
- name: Install Spice (https://install.spiceai.org) (MacOS)
if: matrix.version.os == 'macos-latest'
run: |
brew install spiceai/spiceai/spice
brew install spiceai/spiceai/spiced
- name: Check spice version
run: spice version
- name: Start spice runtime
env:
SPICE_SECRET_POSTGRES_PASSWORD: postgres
working-directory: test/scripts
run: |
spiced &> spice.log &
# time to initialize added dataset
sleep 2
- name: Running tests
run: |
yarn test
env:
API_KEY: ${{ secrets.API_KEY }}
- name: Stop spice and check logs
if: always()
run: |
killall spice || true
cat test/scripts/spice.log