Update woodpecker configuration
This commit is contained in:
parent
10affeb32f
commit
91949622b7
3 changed files with 22 additions and 20 deletions
|
|
@ -1,8 +1,10 @@
|
|||
when:
|
||||
- event: push
|
||||
- event: pull_request
|
||||
- event: manual
|
||||
|
||||
steps:
|
||||
- image: node:lts
|
||||
- image: node:lts-alpine
|
||||
commands:
|
||||
- npm install
|
||||
- npm run build
|
||||
|
|
|
|||
|
|
@ -1,19 +1,18 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
- event: pull_request
|
||||
- event: manual
|
||||
|
||||
steps:
|
||||
- name: python linting
|
||||
image: python:3.11
|
||||
image: ghcr.io/astral-sh/uv:latest
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --group ci
|
||||
- ./.venv/bin/ruff check src/
|
||||
- ./.venv/bin/ruff format --check src/
|
||||
- uv run --no-sync -- check src/
|
||||
- uv run --no-sync -- ruff format --check src/
|
||||
|
||||
- name: javascript linting
|
||||
image: node:lts
|
||||
image: node:lts-alpine
|
||||
commands:
|
||||
- npm install
|
||||
- npm ci
|
||||
- npm run lint
|
||||
|
|
|
|||
|
|
@ -1,36 +1,37 @@
|
|||
when:
|
||||
- event: push
|
||||
- event: pull_request
|
||||
- event: manual
|
||||
|
||||
services:
|
||||
- name: postgres
|
||||
image: postgres:15
|
||||
environment:
|
||||
POSTGRES_NAME: newsreader
|
||||
POSTGRES_USER: newsreader
|
||||
POSTGRES_PASSWORD: sekrit
|
||||
POSTGRES_NAME: &db-name newsreader
|
||||
POSTGRES_USER: &db-user newsreader
|
||||
POSTGRES_PASSWORD: &db-password sekrit
|
||||
- name: memcached
|
||||
image: memcached:1.5.22
|
||||
|
||||
steps:
|
||||
- name: python tests
|
||||
image: python:3.11
|
||||
image: python:3.11-alpine
|
||||
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
|
||||
POSTGRES_DB: *db-name
|
||||
POSTGRES_USER: *db-user
|
||||
POSTGRES_PASSWORD: *db-password
|
||||
commands:
|
||||
- pip install uv
|
||||
- uv sync --group ci
|
||||
- ./.venv/bin/coverage run ./src/manage.py test newsreader
|
||||
- ./.venv/bin/coverage report --show-missing
|
||||
- uv run --no-sync -- coverage run ./src/manage.py test newsreader
|
||||
- uv run --no-sync -- coverage report --show-missing
|
||||
|
||||
- name: javascript tests
|
||||
image: node:lts
|
||||
image: node:lts-alpine
|
||||
commands:
|
||||
- npm install
|
||||
- npm ci
|
||||
- npm test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue