Przeglądaj źródła

Use coverage when running pytest

Colin Powell 2 lat temu
rodzic
commit
1df4300a1a
2 zmienionych plików z 8 dodań i 2 usunięć
  1. 2 2
      .drone.yml
  2. 6 0
      .gitignore

+ 2 - 2
.drone.yml

@@ -8,14 +8,14 @@ name: run_tests
 
 steps:
   # Run tests against Python/Flask engine backend (with pytest)
-  - name: pytest
+  - name: pytest with coverage
     image: python:3.10.4
     commands:
       # Install dependencies
       - pip install poetry
       - poetry install --all-extras
       # Start with a fresh database (which is already running as a service from Drone)
-      - poetry run pytest
+      - poetry run pytest --cov-report term:skip-covered --cov=pysportsdb tests
     volumes:
       # Mount pip cache from host
       - name: pip_cache

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+.DS_Store
+.idea
+*.log
+tmp/
+dist/
+.coverage