Skip to content

refactor: reorganize the Coordinator and gsctl to adapt to the unified schema on FLEX Interactive #3

refactor: reorganize the Coordinator and gsctl to adapt to the unified schema on FLEX Interactive

refactor: reorganize the Coordinator and gsctl to adapt to the unified schema on FLEX Interactive #3

Workflow file for this run

name: Flex Interactive CI
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
workflow_dispatch:
push:
branches:
- main
paths:
- 'flex/**'
- '.github/workflows/interactive.yml'
pull_request:
branches:
- main
paths:
- 'flex/**'
- '.github/workflows/interactive.yml'
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
api-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Add envs to GITHUB_ENV
run: |
short_sha=$(git rev-parse --short HEAD)
echo "SHORT_SHA=${short_sha}" >> $GITHUB_ENV
- name: Build Image
run: |
cd ${GITHUB_WORKSPACE}
python3 -m pip install --upgrade pip && python3 -m pip install -r python/requirements.txt
python3 ./gsctl.py flexbuild interactive --app docker
- name: Build gsctl Wheel Package
run: |
cd ${GITHUB_WORKSPACE}/python
python3 setup_gsctl.py bdist_wheel
- name: Test
run: |
# install gsctl
python3 -m pip install ${GITHUB_WORKSPACE}/python/dist/*.whl
# launch service: 8080 for coordinator http port; 7687 for cypher port;
docker run -p 8080:8080 -p 7688:7687 registry.cn-hongkong.aliyuncs.com/graphscope/interactive:${SHORT_SHA}-x86_64 --enable-coordinator &
# test
python3 -m pip install --no-cache-dir pytest pytest-xdist
python3 -m pytest -d --tx popen//python=python3 \
-s -v \
$(dirname $(python3 -c "import graphscope.gsctl as gsctl; print(gsctl.__file__)"))/tests/test_interactive.py