Update woodpecker configuration
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/tests Pipeline was successful

This commit is contained in:
Sonny Bakker 2025-05-05 15:11:55 +02:00
parent 10affeb32f
commit 91949622b7
3 changed files with 22 additions and 20 deletions

View file

@ -1,8 +1,10 @@
when: when:
- event: push - event: push
- event: pull_request
- event: manual
steps: steps:
- image: node:lts - image: node:lts-alpine
commands: commands:
- npm install - npm install
- npm run build - npm run build

View file

@ -1,19 +1,18 @@
when: when:
- event: push - event: push
branch: main
- event: pull_request - event: pull_request
- event: manual
steps: steps:
- name: python linting - name: python linting
image: python:3.11 image: ghcr.io/astral-sh/uv:latest
commands: commands:
- pip install uv
- uv sync --group ci - uv sync --group ci
- ./.venv/bin/ruff check src/ - uv run --no-sync -- check src/
- ./.venv/bin/ruff format --check src/ - uv run --no-sync -- ruff format --check src/
- name: javascript linting - name: javascript linting
image: node:lts image: node:lts-alpine
commands: commands:
- npm install - npm ci
- npm run lint - npm run lint

View file

@ -1,36 +1,37 @@
when: when:
- event: push - event: push
- event: pull_request
- event: manual
services: services:
- name: postgres - name: postgres
image: postgres:15 image: postgres:15
environment: environment:
POSTGRES_NAME: newsreader POSTGRES_NAME: &db-name newsreader
POSTGRES_USER: newsreader POSTGRES_USER: &db-user newsreader
POSTGRES_PASSWORD: sekrit POSTGRES_PASSWORD: &db-password sekrit
- name: memcached - name: memcached
image: memcached:1.5.22 image: memcached:1.5.22
steps: steps:
- name: python tests - name: python tests
image: python:3.11 image: python:3.11-alpine
environment: environment:
DJANGO_SETTINGS_MODULE: "newsreader.conf.ci" DJANGO_SETTINGS_MODULE: "newsreader.conf.ci"
DJANGO_SECRET_KEY: sekrit DJANGO_SECRET_KEY: sekrit
POSTGRES_HOST: postgres POSTGRES_HOST: postgres
POSTGRES_PORT: 5432 POSTGRES_PORT: 5432
POSTGRES_DB: newsreader POSTGRES_DB: *db-name
POSTGRES_NAME: newsreader POSTGRES_USER: *db-user
POSTGRES_USER: newsreader POSTGRES_PASSWORD: *db-password
POSTGRES_PASSWORD: sekrit
commands: commands:
- pip install uv - pip install uv
- uv sync --group ci - uv sync --group ci
- ./.venv/bin/coverage run ./src/manage.py test newsreader - uv run --no-sync -- coverage run ./src/manage.py test newsreader
- ./.venv/bin/coverage report --show-missing - uv run --no-sync -- coverage report --show-missing
- name: javascript tests - name: javascript tests
image: node:lts image: node:lts-alpine
commands: commands:
- npm install - npm ci
- npm test - npm test