imbajin commented on code in PR #192:
URL:
https://github.com/apache/incubator-hugegraph-ai/pull/192#discussion_r1982870274
##########
.github/workflows/hugegraph-llm.yml:
##########
@@ -0,0 +1,70 @@
+name: HugeGraph-LLM CI
+
+on:
+ push:
+ branches:
+ - 'release-*'
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
+
+ steps:
+ - name: Prepare HugeGraph Server Environment
+ run: |
+ docker run -d --name=graph -p 8080:8080 -e PASSWORD=admin
hugegraph/hugegraph:1.3.0
+ sleep 10
+
+ - uses: actions/checkout@v4
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install uv
+ run: |
+ curl -LsSf https://astral.sh/uv/install.sh | sh
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
+
+ - name: Cache dependencies
+ id: cache-deps
+ uses: actions/cache@v4
+ with:
+ path: |
+ .venv
+ ~/.cache/uv
+ ~/.cache/pip
+ key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{
hashFiles('hugegraph-llm/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-venv-${{ matrix.python-version }}-
+ ${{ runner.os }}-venv-
+
+ - name: Install dependencies
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ uv venv
+ source .venv/bin/activate
+ uv pip install pytest pytest-cov
+ uv pip install -r ./hugegraph-llm/requirements.txt
+
+ - name: Run unit tests
+ run: |
+ source .venv/bin/activate
+ export PYTHONPATH=$(pwd)/hugegraph-llm/src
+ export SKIP_EXTERNAL_SERVICES=true
+ cd hugegraph-llm
+ python -m pytest src/tests/operators/hugegraph_op/ src/tests/config/
src/tests/document/ src/tests/middleware/ -v
+
+ - name: Run integration tests
+ run: |
+ source .venv/bin/activate
+ export PYTHONPATH=$(pwd)/hugegraph-llm/src
+ export SKIP_EXTERNAL_SERVICES=true
+ cd hugegraph-llm
+ python -m pytest src/tests/integration/test_graph_rag_pipeline.py -v
Review Comment:
Note each file should have a EOF line (U could config it in your IDE's
settings)
<img width="605" alt="image"
src="https://github.com/user-attachments/assets/52eadd13-c551-46b1-aa33-d4d4ac5186c8"
/>
##########
.github/workflows/hugegraph-llm.yml:
##########
@@ -0,0 +1,70 @@
+name: HugeGraph-LLM CI
+
+on:
+ push:
+ branches:
+ - 'release-*'
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
+
+ steps:
+ - name: Prepare HugeGraph Server Environment
+ run: |
+ docker run -d --name=graph -p 8080:8080 -e PASSWORD=admin
hugegraph/hugegraph:1.3.0
+ sleep 10
+
+ - uses: actions/checkout@v4
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Install uv
+ run: |
+ curl -LsSf https://astral.sh/uv/install.sh | sh
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
+
+ - name: Cache dependencies
+ id: cache-deps
+ uses: actions/cache@v4
+ with:
+ path: |
+ .venv
+ ~/.cache/uv
+ ~/.cache/pip
+ key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{
hashFiles('hugegraph-llm/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-venv-${{ matrix.python-version }}-
+ ${{ runner.os }}-venv-
+
+ - name: Install dependencies
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ uv venv
+ source .venv/bin/activate
+ uv pip install pytest pytest-cov
+ uv pip install -r ./hugegraph-llm/requirements.txt
+
+ - name: Run unit tests
+ run: |
+ source .venv/bin/activate
+ export PYTHONPATH=$(pwd)/hugegraph-llm/src
+ export SKIP_EXTERNAL_SERVICES=true
+ cd hugegraph-llm
+ python -m pytest src/tests/operators/hugegraph_op/ src/tests/config/
src/tests/document/ src/tests/middleware/ -v
+
+ - name: Run integration tests
+ run: |
+ source .venv/bin/activate
+ export PYTHONPATH=$(pwd)/hugegraph-llm/src
+ export SKIP_EXTERNAL_SERVICES=true
+ cd hugegraph-llm
+ python -m pytest src/tests/integration/test_graph_rag_pipeline.py -v
Review Comment:
Note each file should have a EOF line (U could config it in your IDE's
settings)
<img width="605" alt="image"
src="https://github.com/user-attachments/assets/52eadd13-c551-46b1-aa33-d4d4ac5186c8"
/>
So as others files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]