59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: e2e
|
|
|
|
labels:
|
|
podman: "true"
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
- pull_request
|
|
|
|
steps:
|
|
- name: run-e2e
|
|
image: registry.sovraigns.network/harb/playwright-ci:latest
|
|
privileged: true
|
|
environment:
|
|
PNPM_HOME: /root/.local/share/pnpm
|
|
PATH: /root/.local/share/pnpm:/root/.local/bin:/usr/local/bin:/usr/bin:/bin
|
|
HARB_ENV: BASE_SEPOLIA_LOCAL_FORK
|
|
SKIP_WATCH: "1"
|
|
XDG_RUNTIME_DIR: /tmp/podman-run
|
|
commands:
|
|
- |
|
|
set -euo pipefail
|
|
mkdir -p "$XDG_RUNTIME_DIR"
|
|
git submodule update --init --recursive
|
|
yarn install --cwd onchain/lib/uni-v3-lib --frozen-lockfile
|
|
npm config set fund false
|
|
npm config set audit false
|
|
npm ci --prefix kraiken-lib --no-audit --no-fund
|
|
./scripts/build-kraiken-lib.sh
|
|
npm ci --prefix landing --no-audit --no-fund
|
|
npm ci --prefix web-app --no-audit --no-fund
|
|
npm ci --prefix services/ponder --no-audit --no-fund
|
|
npm ci --prefix services/txnBot --no-audit --no-fund
|
|
npm ci --no-audit --no-fund
|
|
npx playwright install chromium
|
|
trap "./scripts/dev.sh stop || true" EXIT
|
|
./scripts/dev.sh start
|
|
timeout 240 bash -c 'until curl -sf http://localhost:8081/api/graphql > /dev/null; do sleep 3; done'
|
|
npm run test:e2e
|
|
|
|
- name: collect-artifacts
|
|
image: alpine:3.20
|
|
depends_on:
|
|
- run-e2e
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
commands:
|
|
- |
|
|
set -euo pipefail
|
|
apk add --no-cache tar gzip
|
|
mkdir -p artifacts
|
|
if [ -d playwright-report ]; then tar -czf artifacts/playwright-report.tgz playwright-report; fi
|
|
if [ -d test-results ]; then tar -czf artifacts/test-results.tgz test-results; fi
|
|
if [ -d logs ]; then tar -czf artifacts/stack-logs.tgz logs; fi
|