Push events test the raw branch which may be behind main. PR events test the merge result, which is what matters. This eliminates false CI failures that block the dev-agent.
31 lines
862 B
YAML
31 lines
862 B
YAML
# .woodpecker/ci.yml — Disinto CI pipeline
|
|
# Runs on every push and pull request.
|
|
#
|
|
# Steps:
|
|
# 1. shellcheck — lint all .sh files (warnings+errors)
|
|
# 2. duplicate-detection — report copy-pasted code blocks (fails only on new duplicates for PRs)
|
|
|
|
when:
|
|
event: [push, pull_request]
|
|
|
|
steps:
|
|
- name: shellcheck
|
|
image: koalaman/shellcheck-alpine:stable
|
|
commands:
|
|
- find . -name "*.sh" -not -path "./.git/*" -print0 | xargs -0 -r shellcheck --severity=warning
|
|
|
|
- name: agent-smoke
|
|
image: alpine:3
|
|
when:
|
|
event: pull_request
|
|
commands:
|
|
- apk add --no-cache bash
|
|
- bash .woodpecker/agent-smoke.sh
|
|
|
|
- name: duplicate-detection
|
|
image: python:3-alpine
|
|
commands:
|
|
- apk add --no-cache git
|
|
- python3 .woodpecker/detect-duplicates.py
|
|
environment:
|
|
DIFF_BASE: ${CI_COMMIT_TARGET_BRANCH}
|