Add coverage run to drone
This commit is contained in:
17
.drone.yml
17
.drone.yml
@ -8,7 +8,22 @@ name: run_tests
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Run tests against Python/Flask engine backend (with pytest)
|
# 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
|
image: python:3.10.4
|
||||||
commands:
|
commands:
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user