Skip to content

Commit 9b9f174

Browse files
authored
Bump version 1.5.1 and add Docker build and test (#95)
1 parent 94efde4 commit 9b9f174

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,50 @@ jobs:
204204
elif [[ "${{ matrix.arch }}" == "ARM64" ]]; then
205205
docker rmi memgraph/mgbuild:v7_debian-12-arm || true
206206
fi
207+
208+
docker_build_and_test:
209+
name: Build and test mgconsole in Docker container
210+
runs-on: ubuntu-latest
211+
timeout-minutes: 5
212+
steps:
213+
- name: Checkout repository
214+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
215+
216+
- name: Build and test mgconsole in Docker container
217+
run: |
218+
docker build -t mgconsole .
219+
220+
- name: Run latest Memgraph Docker container
221+
run: |
222+
docker run --rm -d --name memgraph --network host memgraph/memgraph:latest --telemetry-enabled=false
223+
224+
- name: Wait for Memgraph Bolt
225+
run: |
226+
host=127.0.0.1
227+
port=7687
228+
max_attempts=120
229+
delay=1
230+
for attempt in $(seq 1 "$max_attempts"); do
231+
if bash -c "echo >/dev/tcp/${host}/${port}" 2>/dev/null; then
232+
echo "Memgraph Bolt port open at ${host}:${port}"
233+
exit 0
234+
fi
235+
sleep "$delay"
236+
done
237+
echo "Timeout waiting for Memgraph Bolt at ${host}:${port}"
238+
exit 1
239+
240+
- name: Test mgconsole in Docker container
241+
run: |
242+
# Test pipe directly into docker run
243+
echo "RETURN 1;" | docker run --network host mgconsole:latest
244+
245+
# Test entrypoint override with echo
246+
docker run --network host --rm --entrypoint sh mgconsole:latest -c "echo 'RETURN 1;' | mgconsole"
247+
248+
- name: Cleanup docker images
249+
run: |
250+
docker rmi mgconsole || true
251+
docker stop memgraph || true
252+
docker rm memgraph || true
253+
docker rmi memgraph/memgraph:latest || true

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

1717
cmake_minimum_required(VERSION 3.10)
18-
project(mgconsole VERSION 1.5)
18+
project(mgconsole VERSION 1.5.1)
1919
include(CTest)
2020

2121
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)

0 commit comments

Comments
 (0)