harb/.woodpecker/ci.yml
openhands ab68e0cb68 fix: Dual package managers: both package-lock.json and yarn.lock tracked (#343)
Remove kraiken-lib/yarn.lock (npm is the sole package manager per CI and
build scripts), add packageManager field to kraiken-lib/package.json to
make the intent explicit, and add a single-package-manager CI step that
fails the build if yarn.lock reappears in kraiken-lib/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:51:59 +00:00

101 lines
3 KiB
YAML

kind: pipeline
type: docker
name: build-and-test
when:
event: pull_request
clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 50
netrc_machine: codeberg.org
netrc_username: johba
netrc_password:
from_secret: codeberg_token
steps:
- name: bootstrap-deps
image: registry.niovi.voyage/harb/node-ci:latest
commands:
- |
bash -c '
set -euo pipefail
git submodule update --init --recursive
yarn --cwd onchain/lib/uni-v3-lib install --frozen-lockfile
'
- name: foundry-suite
image: registry.niovi.voyage/harb/node-ci:latest
commands:
- |
bash -c '
set -euo pipefail
cd onchain
export PATH=/root/.foundry/bin:$PATH
forge --version
forge build
forge test -vvv
forge snapshot
'
- name: contracts-local-fork
image: registry.niovi.voyage/harb/node-ci:latest
environment:
HARB_ENV: BASE_SEPOLIA_LOCAL_FORK
commands:
- |
bash -c '
set -euo pipefail
cd onchain
export PATH=/root/.foundry/bin:$PATH
forge test -vv --ffi
'
# NOTE: contracts-base-sepolia step removed — requires base_sepolia_rpc secret
# which is not configured. Re-add when RPC secret is provisioned.
- name: single-package-manager
image: registry.niovi.voyage/harb/node-ci:latest
commands:
- |
bash -c '
set -euo pipefail
if [ -f kraiken-lib/yarn.lock ]; then
echo "ERROR: kraiken-lib/yarn.lock must not be committed. Use npm only (see packageManager field in kraiken-lib/package.json)." >&2
exit 1
fi
'
- name: node-quality
image: registry.niovi.voyage/harb/node-ci:latest
environment:
CI: "true"
NODE_OPTIONS: "--max-old-space-size=2048"
commands:
- |
bash -c '
set -euo pipefail
npm config set fund false
npm config set audit false
./scripts/build-kraiken-lib.sh
# Root install links workspace packages (@harb/web3) + all workspace members
npm install --no-audit --no-fund
# Landing (workspace member — deps already installed by root)
npm run lint --prefix landing
npm run build --prefix landing
# Web-app (workspace member)
npm run lint --prefix web-app
npm run test --prefix web-app -- --run
npm run build --prefix web-app
# Ponder (standalone — not a workspace member)
npm install --prefix services/ponder --no-audit --no-fund
npm run lint --prefix services/ponder
npm run build --prefix services/ponder
# TxnBot (standalone)
npm install --prefix services/txnBot --no-audit --no-fund
npm run lint --prefix services/txnBot
npm run test --prefix services/txnBot
npm run build --prefix services/txnBot
'