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:
parent
8d22c97320
commit
6897820cc7
1 changed files with 15 additions and 0 deletions
15
.drone.yml
15
.drone.yml
|
|
@ -14,6 +14,13 @@ trigger:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Run frontend tests
|
||||||
|
image: node:24-alpine
|
||||||
|
commands:
|
||||||
|
- cd frontend
|
||||||
|
- npm ci
|
||||||
|
- npx vitest run
|
||||||
|
|
||||||
- name: Cache builder stage
|
- name: Cache builder stage
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
|
@ -102,6 +109,14 @@ trigger:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
steps:
|
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
|
- name: Cache builder stage
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue