Bläddra i källkod

Measure coverage of subprocesses, exclude protobuf compiled files (#568)

Max Ryabinin 2 år sedan
förälder
incheckning
11d70feb40
2 ändrade filer med 6 tillägg och 1 borttagningar
  1. 1 1
      .github/workflows/run-tests.yml
  2. 5 0
      pyproject.toml

+ 1 - 1
.github/workflows/run-tests.yml

@@ -100,6 +100,6 @@ jobs:
       - name: Test
         run: |
           export HIVEMIND_MEMORY_SHARING_STRATEGY=file_descriptor
-          pytest --cov hivemind -v tests
+          pytest --cov hivemind --cov-config=pyproject.toml -v tests
       - name: Upload coverage to Codecov
         uses: codecov/codecov-action@v3

+ 5 - 0
pyproject.toml

@@ -8,3 +8,8 @@ line_length = 119
 combine_as_imports = true
 combine_star = true
 known_local_folder = ["arguments", "test_utils", "tests", "utils"]
+
+[tool.coverage.run]
+concurrency = ["thread", "multiprocessing"]
+omit = ["hivemind/proto/*"]
+source = ["hivemind"]