Files
vrobbler/.drone.yml
2023-01-19 14:48:33 -05:00

48 lines
1.2 KiB
YAML

---
################
# Build & Test #
################
kind: pipeline
name: run_tests
steps:
# Run tests against Python/Flask engine backend (with pytest)
- name: coverage
image: python:3.10.4
commands:
# Install dependencies
- cp vrobbler.conf.test 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 term --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
- cp vrobbler.conf.test vrobbler.conf
- pip install poetry
- poetry install
# Start with a fresh database (which is already running as a service from Drone)
- poetry run pytest
environment:
VROBBLER_DATABASE_URL: sqlite:///test.db
volumes:
# Mount pip cache from host
- name: pip_cache
path: /root/.cache/pip
volumes:
- name: docker
host:
path: /var/run/docker.sock
- name: pip_cache
host:
path: /tmp/cache/drone/pip