chore(llm): multi-stage building in Dockerfile (#199) #1028
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Pylint" | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'master' | |
- 'release-*' | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup 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('**/requirements.txt', '**/pyproject.toml') }} | |
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 pylint pytest | |
# TODO: use pyproject.toml later (unify all projects) | |
uv pip install -r ./hugegraph-llm/requirements.txt | |
uv pip install -r ./hugegraph-ml/requirements.txt | |
uv pip install -r ./hugegraph-python-client/requirements.txt | |
- name: Check DGL version | |
run: | | |
source .venv/bin/activate | |
python -c "import dgl; print(dgl.__version__)" | |
- name: Analysing the code with pylint | |
run: | | |
source .venv/bin/activate | |
bash ./style/code_format_and_analysis.sh -p |