Skip to content

SY-4004: Use Oracle to Generate Retrieve Queries #379

SY-4004: Use Oracle to Generate Retrieve Queries

SY-4004: Use Oracle to Generate Retrieve Queries #379

name: Test - Migration (Clients)
on:
pull_request:
paths:
- .github/actions/test-python/**
- .github/actions/test-typescript/**
- .github/workflows/test.migration.clients.yaml
- alamos/go/**
- alamos/py/**
- arc/go/**
- aspen/**
- cesium/**
- client/py/**
- client/ts/**
- core/**
- freighter/go/**
- freighter/py/**
- freighter/ts/**
- package.json
- pnpm-lock.yaml
- pyproject.toml
- uv.lock
- uv.toml
- x/go/**
- x/ts/**
push:
branches:
- main
- rc
paths:
- .github/actions/test-python/**
- .github/actions/test-typescript/**
- .github/workflows/test.migration.clients.yaml
- alamos/go/**
- alamos/py/**
- arc/go/**
- aspen/**
- cesium/**
- client/py/**
- client/ts/**
- core/**
- freighter/go/**
- freighter/py/**
- freighter/ts/**
- package.json
- pnpm-lock.yaml
- pyproject.toml
- uv.lock
- uv.toml
- x/go/**
- x/ts/**
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
packages: write
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Start Core on main
id: start_main
run:
docker run -d --name synnax-main -p 9090:9090 -e SYNNAX_LISTEN=0.0.0.0:9090 -e
SYNNAX_VERBOSE=true -e SYNNAX_INSECURE=true -e SYNNAX_MEM=false -e
SYNNAX_LICENSE_KEY=${{ secrets.SYNNAX_LICENSE_KEY }}
ghcr.io/synnaxlabs/synnax:latest
- name: Wait for Core on main
run: |
for i in $(seq 1 30); do
nc -z localhost 9090 && exit 0
sleep 1
done
echo "Synnax failed to start" && exit 1
- name: Checkout main
uses: actions/checkout@v6
with:
ref: main
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: client/py/pyproject.toml
- name: Test Python with Core on main
run: uv run pytest
working-directory: client/py
- name: Test TypeScript with Core on main
uses: ./.github/actions/test-typescript
with:
package: client
lint: false
- name: Stop Core on main
if: always() && steps.start_main.outcome == 'success'
run: |
docker logs synnax-main
docker stop synnax-main
docker rm synnax-main
- name: Checkout current branch
uses: actions/checkout@v6
- name: Login to Github Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract Go version
id: go-version
run:
echo "GO_VERSION=$(grep '^go ' core/go.mod | awk '{print $2}')" >>
$GITHUB_OUTPUT
- name: Build and push Core on current
uses: docker/build-push-action@v6
with:
context: .
file: core/Dockerfile
platforms: linux/amd64
push: true
tags: ghcr.io/synnaxlabs/synnax:${{ github.sha }}
cache-from: type=gha,scope=synnax-docker-cache
cache-to: type=inline
build-args: GO_VERSION=${{ steps.go-version.outputs.GO_VERSION }}
- name: Start Core on current branch
id: start_current
run:
docker run -d --name synnax-current -p 9090:9090 -e SYNNAX_LISTEN=0.0.0.0:9090
-e SYNNAX_VERBOSE=true -e SYNNAX_INSECURE=true -e SYNNAX_MEM=false -e
SYNNAX_LICENSE_KEY=${{ secrets.SYNNAX_LICENSE_KEY }}
ghcr.io/synnaxlabs/synnax:${{ github.sha }}
- name: Wait for Core on current branch
run: |
for i in $(seq 1 30); do
nc -z localhost 9090 && exit 0
sleep 1
done
echo "Synnax failed to start" && exit 1
- name: Test Python with Core on current branch
uses: ./.github/actions/test-python
with:
directory: client/py
type_check: false
format_check: false
- name: Test TypeScript with Core on current branch
uses: ./.github/actions/test-typescript
with:
package: client
lint: false
- name: Stop Core on current branch
if: always() && steps.start_current.outcome == 'success'
run: |
docker logs synnax-current
docker stop synnax-current
docker rm synnax-current