From 7447a9711711b9461cd2fed44e1f4a6fd0a202cc Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Thu, 19 Jan 2023 14:44:51 -0500 Subject: [PATCH] Add coverage run to drone --- .drone.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1e58183..54fa196 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,7 +8,22 @@ name: run_tests steps: # Run tests against Python/Flask engine backend (with pytest) - - name: django_tests + - name: coverage + image: python:3.10.4 + commands: + # Install dependencies + - cp vrobbler.conf.example vrobbler.conf + - pip install poetry + - poetry install + # Start with a fresh database (which is already running as a service from Drone) + - poetry run pytest --cov-report --cov=vrobbler tests + environment: + VROBBLER_DATABASE_URL: sqlite:///test.db + volumes: + # Mount pip cache from host + - name: pip_cache + path: /root/.cache/pip + - name: pytest image: python:3.10.4 commands: # Install dependencies