From f67ed419b7d01ddd16f32bee8870932273a7ec6b Mon Sep 17 00:00:00 2001 From: LorenzLamm Date: Wed, 29 Jan 2025 13:39:36 +0100 Subject: [PATCH 1/4] add cli tests --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ tests/test_clis.sh | 8 ++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 tests/test_clis.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1f78b75 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: Command-Line Tests + +on: [push, pull_request] + +jobs: + run-tests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set Up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Dependencies + run: | + python -m venv venv + source venv/bin/activate + pip install --upgrade pip + pip install . # Install project dependencies from pyproject.toml + + - name: Run Test Script + run: | + chmod +x tests/test_clis.sh + ./tests/test_clis.sh \ No newline at end of file diff --git a/tests/test_clis.sh b/tests/test_clis.sh new file mode 100644 index 0000000..a1c7d3f --- /dev/null +++ b/tests/test_clis.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Example command-line operations +echo "Running membrain" +membrain +echo "Running membrain_pick" +membrain_pick +echo "Running membrain_stats" +membrain_stats \ No newline at end of file From d2000d3f60976366a247036f807aa80c8d7de91b Mon Sep 17 00:00:00 2001 From: LorenzLamm Date: Wed, 29 Jan 2025 13:41:51 +0100 Subject: [PATCH 2/4] remove python 3.8 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f78b75..14c6e89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] steps: - name: Checkout Repository From 99b06fcf61aebec26f32cffba49c21b42f3adb1c Mon Sep 17 00:00:00 2001 From: LorenzLamm Date: Wed, 29 Jan 2025 13:51:14 +0100 Subject: [PATCH 3/4] acivate venv before running --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14c6e89..3c25794 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,5 +27,6 @@ jobs: - name: Run Test Script run: | + source venv/bin/activate chmod +x tests/test_clis.sh ./tests/test_clis.sh \ No newline at end of file From 122de6a85008ff093831ec520b98b61625124abb Mon Sep 17 00:00:00 2001 From: LorenzLamm Date: Wed, 29 Jan 2025 13:56:18 +0100 Subject: [PATCH 4/4] add more cli commands --- tests/test_clis.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_clis.sh b/tests/test_clis.sh index a1c7d3f..d2c6a3a 100644 --- a/tests/test_clis.sh +++ b/tests/test_clis.sh @@ -2,7 +2,10 @@ # Example command-line operations echo "Running membrain" membrain +membrain segment +membrain train echo "Running membrain_pick" membrain_pick +membrain_pick train echo "Running membrain_stats" membrain_stats \ No newline at end of file