From 7f956a5bc0a08d4c68c25784ae9223cd42a1ac50 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 16 Apr 2026 10:44:40 +0100 Subject: [PATCH 1/2] Bump version 1.5.1 and add Docker build and test --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff7fbed7..b1070304 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -204,3 +204,33 @@ jobs: elif [[ "${{ matrix.arch }}" == "ARM64" ]]; then docker rmi memgraph/mgbuild:v7_debian-12-arm || true fi + + docker_build_and_test: + name: Build and test mgconsole in Docker container + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Build and test mgconsole in Docker container + run: | + docker build -t mgconsole . + + - name: Run latest Memgraph Docker container + run: | + docker run --rm -d --name memgraph --network host memgraph/memgraph:latest --telemetry-enabled=false + + - name: Test mgconsole in Docker container + run: | + # Test pipe directly into docker run + echo "RETURN 1;" | docker run --network host mgconsole:latest + + # Test entrypoint override with echo + docker run --network host --rm --entrypoint sh mgconsole:latest -c "echo 'RETURN 1;' | mgconsole" + + - name: Cleanup docker images + run: | + docker rmi mgconsole || true + docker stop memgraph || true + docker rm memgraph || true + docker rmi memgraph/memgraph:latest || true diff --git a/CMakeLists.txt b/CMakeLists.txt index a81f2e31..54cae06d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ # along with this program. If not, see . cmake_minimum_required(VERSION 3.10) -project(mgconsole VERSION 1.5) +project(mgconsole VERSION 1.5.1) include(CTest) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) From 52ffe4c4abb35d709f617b18a7a42ec2b73b3ba1 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 16 Apr 2026 11:00:30 +0100 Subject: [PATCH 2/2] added wait --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1070304..95f47ca8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -208,6 +208,7 @@ jobs: docker_build_and_test: name: Build and test mgconsole in Docker container runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -220,6 +221,22 @@ jobs: run: | docker run --rm -d --name memgraph --network host memgraph/memgraph:latest --telemetry-enabled=false + - name: Wait for Memgraph Bolt + run: | + host=127.0.0.1 + port=7687 + max_attempts=120 + delay=1 + for attempt in $(seq 1 "$max_attempts"); do + if bash -c "echo >/dev/tcp/${host}/${port}" 2>/dev/null; then + echo "Memgraph Bolt port open at ${host}:${port}" + exit 0 + fi + sleep "$delay" + done + echo "Timeout waiting for Memgraph Bolt at ${host}:${port}" + exit 1 + - name: Test mgconsole in Docker container run: | # Test pipe directly into docker run