Add test steps to Drone CI pipelines before image builds

Frontend pipeline: runs vitest via node:24-alpine before building.
API pipeline: installs deps and runs pytest via python:3.13-slim before building.
Both steps fail-fast (-x) so broken tests block deployment.
This commit is contained in:
Viktor Barzin 2026-02-10 22:01:28 +00:00
parent 8d22c97320
commit 6897820cc7
No known key found for this signature in database
GPG key ID: 0EB088298288D958

View file

@ -14,6 +14,13 @@ trigger:
- push
steps:
- name: Run frontend tests
image: node:24-alpine
commands:
- cd frontend
- npm ci
- npx vitest run
- name: Cache builder stage
image: plugins/docker
settings:
@ -102,6 +109,14 @@ trigger:
- push
steps:
- name: Run backend tests
image: python:3.13-slim
commands:
- apt-get update && apt-get install -y --no-install-recommends gcc libmariadb-dev python3-dev build-essential && rm -rf /var/lib/apt/lists/*
- pip install --no-cache-dir -r requirements.txt
- pip install --no-cache-dir pytest pytest-asyncio pytest-xdist httpx aioresponses fakeredis
- pytest tests/ -x -q
- name: Cache builder stage
image: plugins/docker
settings: