浏览代码

Fixes #23046: Install dulwich in CI so Git backend tests run

dulwich is the optional 'git' extra and is not in requirements.txt, so CI
never had it installed. The four GitBackendCredentialIntegrationTestCase
tests added in #21252 have therefore been skipped since they were written,
leaving the Git data source credential handling without CI coverage.

These tests mock dulwich.porcelain.clone, so they only need the module to be
importable. Installing it in the test environment does not change what a
NetBox deployment pulls in: dulwich stays optional at runtime, as decided in
#12906.
Jason Novinger 2 天之前
父节点
当前提交
ad10aa3381
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      .github/workflows/ci.yml

+ 4 - 0
.github/workflows/ci.yml

@@ -122,6 +122,10 @@ jobs:
           python -m pip install --upgrade pip
           python -m pip install --upgrade pip
           pip install -r requirements.txt
           pip install -r requirements.txt
           pip install coverage tblib
           pip install coverage tblib
+          # dulwich is the optional 'git' extra, so it is absent from requirements.txt.
+          # The Git data backend tests mock dulwich.porcelain.clone and only need the
+          # module to be importable; without it they skip silently.
+          pip install dulwich
 
 
       - name: Check for missing migrations
       - name: Check for missing migrations
         run: python netbox/manage.py makemigrations --check
         run: python netbox/manage.py makemigrations --check