.drone.yml 722 B

1234567891011121314151617181920212223242526272829
  1. ---
  2. ################
  3. # Build & Test #
  4. ################
  5. kind: pipeline
  6. name: run_tests
  7. steps:
  8. # Run tests against Python/Flask engine backend (with pytest)
  9. - name: pytest with coverage
  10. image: python:3.10.4
  11. commands:
  12. # Install dependencies
  13. - pip install poetry
  14. - poetry install --all-extras
  15. # Start with a fresh database (which is already running as a service from Drone)
  16. - poetry run pytest --cov-report term:skip-covered --cov=pysportsdb tests
  17. volumes:
  18. # Mount pip cache from host
  19. - name: pip_cache
  20. path: /root/.cache/pip
  21. volumes:
  22. - name: docker
  23. host:
  24. path: /var/run/docker.sock
  25. - name: pip_cache
  26. host:
  27. path: /tmp/cache/drone/pip