diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml new file mode 100644 index 0000000..ba795b4 --- /dev/null +++ b/.woodpecker/build.yaml @@ -0,0 +1,8 @@ +when: + - event: push + +steps: + - image: node:lts + commands: + - npm install + - npm run build diff --git a/.woodpecker/lint.yaml b/.woodpecker/lint.yaml new file mode 100644 index 0000000..1bb119e --- /dev/null +++ b/.woodpecker/lint.yaml @@ -0,0 +1,19 @@ +when: + - event: push + branch: main + - event: pull_request + +steps: + - name: python linting + image: python:3.11 + commands: + - pip install uv + - uv sync --extra testing --extra ci + - ./.venv/bin/ruff check src/ + - ./.venv/bin/ruff format --check src/ + + - name: javascript linting + image: node:lts + commands: + - npm install + - npm run lint diff --git a/.woodpecker/test-workflow.yaml b/.woodpecker/test-workflow.yaml deleted file mode 100644 index a386329..0000000 --- a/.woodpecker/test-workflow.yaml +++ /dev/null @@ -1,16 +0,0 @@ -when: - - event: push - branch: woodpecker-actions - -steps: - - name: build - image: debian - commands: - - echo "This is the build step" - - echo "binary-data-123" > executable - - chmod +x ./executable - - name: a-test-step - image: golang:1.16 - commands: - - echo "Testing ..." - - ./executable diff --git a/.woodpecker/tests.yaml b/.woodpecker/tests.yaml new file mode 100644 index 0000000..530652b --- /dev/null +++ b/.woodpecker/tests.yaml @@ -0,0 +1,21 @@ +when: + - event: push + +services: + - image: postgres:15 + - image: memcached:1.5.22 + +steps: + - name: python tests + image: python:3.11 + 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