imbajin commented on code in PR #192:
URL:
https://github.com/apache/incubator-hugegraph-ai/pull/192#discussion_r1982875285
##########
.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:
https://github.com/apache/incubator-hugegraph-ai/actions/runs/13693587346/job/38291894859?pr=192
And could check the CI status here (U could submit a PR in your own repo,
select the upstream branch like
`yanchaomei:main` to test it separately)
<img width="754" alt="image"
src="https://github.com/user-attachments/assets/00d6ba4d-f32c-4051-95d1-a68c2162b851"
/>
Also better not use `main/master` as your default branch, keep it clean & it
could sync the code with upstream
easily(one-click), if u want to modify some code u could checkout a **new
branch** from `main` like `dev-xx` (This can avoid many potential conflicts and
inconsistencies in the future, and also maintain clarity in using Git)
--
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]