Skip to content

Fix surrealdb installation scripts to correctly provide the version n… #9

Fix surrealdb installation scripts to correctly provide the version n…

Fix surrealdb installation scripts to correctly provide the version n… #9

Workflow file for this run

name: Integration Tests
on:
push:
branches:
- main
paths:
- 'destination-surrealdb/**'
- '.devcontainer/**'
- '.github/workflows/integration.yml'
pull_request:
branches:
- main
paths:
- 'destination-surrealdb/**'
- '.devcontainer/**'
- '.github/workflows/integration.yml'
workflow_dispatch:
jobs:
integration-tests:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
matrix:
# Note that this version number must be a valid SurrealDB image tag
surrealdb-version: ["latest", "v3.0.0-alpha.5", "v2.3.3", "v2.2.3"]
env:
SURREALDB_VERSION: ${{ matrix.surrealdb-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run integration tests in dev container
uses: devcontainers/[email protected]
env:
SURREALDB_VERSION: ${{ matrix.surrealdb-version }}
with:
subFolder: destination-surrealdb
env: |
SURREALDB_VERSION=${{ matrix.surrealdb-version }}
runCmd: |
echo "=== Testing with SurrealDB version: $SURREALDB_VERSION ==="
echo "=== Verifying SurrealDB server version ==="
timeout 30 sh -c 'until curl -f http://surrealdb:8000/health 2>/dev/null; do sleep 1; done' || (echo "SurrealDB container not ready" && exit 1)
surreal version --endpoint http://surrealdb:8000 || echo "CLI version query failed"
echo "INFO FOR ROOT;" | surreal sql --endpoint http://surrealdb:8000 --username root --password root --pretty || echo "SQL info query failed"
echo "=== Installing dependencies ==="
poetry install --no-root
echo "=== Running integration tests ==="
poetry run python -m pytest integration_tests/integration_test.py -v -s --tb=long
push: never