Add woodpecker CI configuration
This commit is contained in:
parent
bf43603d65
commit
aff565862c
9 changed files with 64 additions and 94 deletions
36
.woodpecker/tests.yaml
Normal file
36
.woodpecker/tests.yaml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
when:
|
||||
- event: push
|
||||
|
||||
services:
|
||||
- name: postgres
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_NAME: newsreader
|
||||
POSTGRES_USER: newsreader
|
||||
POSTGRES_PASSWORD: sekrit
|
||||
- name: memcached
|
||||
image: memcached:1.5.22
|
||||
|
||||
steps:
|
||||
- name: python tests
|
||||
image: python:3.11
|
||||
environment:
|
||||
DJANGO_SETTINGS_MODULE: "newsreader.conf.ci"
|
||||
DJANGO_SECRET_KEY: sekrit
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: newsreader
|
||||
POSTGRES_NAME: newsreader
|
||||
POSTGRES_USER: newsreader
|
||||
POSTGRES_PASSWORD: sekrit
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --extra testing --extra ci
|
||||
- ./.venv/bin/coverage run ./src/manage.py test newsreader
|
||||
- ./.venv/bin/coverage report --show-missing
|
||||
|
||||
- name: javascript tests
|
||||
image: node:lts
|
||||
commands:
|
||||
- npm install
|
||||
- npm test
|
||||
Loading…
Add table
Add a link
Reference in a new issue