Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,50 @@ 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
timeout-minutes: 5
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: 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
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

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)
Expand Down
Loading