참고소스 수정본
This commit is contained in:
45
참고/neo4j-graphrag-python-main/.github/workflows/pr.yaml
vendored
Normal file
45
참고/neo4j-graphrag-python-main/.github/workflows/pr.yaml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: neo4j_graphrag PR
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
|
||||
steps:
|
||||
- name: Free up disk space (ubuntu-latest)
|
||||
run: |
|
||||
sudo rm -rf /usr/local/lib/android \
|
||||
/usr/share/dotnet \
|
||||
/opt/ghc \
|
||||
/opt/hostedtoolcache
|
||||
sudo apt-get clean || true
|
||||
df -h
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@v3
|
||||
- name: Load cached venv
|
||||
id: cached-venv
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/uv.lock') }}
|
||||
- name: Install dependencies
|
||||
if: steps.cached-venv.outputs.cache-hit != 'true'
|
||||
run: uv sync --frozen --all-extras --group dev
|
||||
- name: Check format and linting
|
||||
run: |
|
||||
uv run ruff check .
|
||||
uv run ruff format --check .
|
||||
- name: Run strict mypy check
|
||||
run: uv run mypy .
|
||||
- name: Run unit tests and check coverage
|
||||
run: |
|
||||
uv run coverage run -m pytest tests/unit
|
||||
uv run coverage report --fail-under=90
|
||||
Reference in New Issue
Block a user