Files
landing/.woodpecker/ci.yaml
mifi 2d0a4935a5
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline failed
Pipeline fixes
2026-02-12 00:32:52 -03:00

129 lines
4.4 KiB
YAML

# CI workflow: one clone, one workspace — install → lint → build → unit test - e2e test.
# Runs on pull requests, push/tag/manual on main, or manual from any branch.
# Deploy workflow depends on this (ci) and runs only on main.
when:
- event: pull_request
- event: push
branch: main
- event: tag
- event: manual
steps:
- name: install
image: node:20-alpine
commands:
- corepack enable && corepack prepare pnpm@10.28.2 --activate
- pnpm install --frozen-lockfile || pnpm install
- name: lint
image: node:20-alpine
commands:
- corepack enable && corepack prepare pnpm@10.28.2 --activate
- pnpm install --frozen-lockfile || pnpm install
- pnpm run lint
- pnpm run lint:css
depends_on:
- install
- name: Send Lint Status Notification (failure)
image: curlimages/curl
environment:
MATTERMOST_WEBHOOK_URL:
from_secret: mattermost_test_webhook
commands:
- |
BODY=$(printf '{"username":"WoodpeckerBot","text":"[%s - Build #%s] Lint failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$MATTERMOST_WEBHOOK_URL"
depends_on:
- lint
when:
- status: [failure]
- name: build
image: node:20-alpine
commands:
- corepack enable && corepack prepare pnpm@10.28.2 --activate
- pnpm install --frozen-lockfile || pnpm install
- pnpm run build
depends_on:
- install
- name: Send Test Build Status Notification (failure)
image: curlimages/curl
environment:
MATTERMOST_WEBHOOK_URL:
from_secret: mattermost_test_webhook
commands:
- |
BODY=$(printf '{"username":"WoodpeckerBot","text":"[%s - Build #%s] Test build failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$MATTERMOST_WEBHOOK_URL"
depends_on:
- build
when:
- status: [failure]
- name: unit test
image: node:20-alpine
commands:
- corepack enable && corepack prepare pnpm@10.28.2 --activate
- pnpm install --frozen-lockfile || pnpm install
- pnpm test
depends_on:
- install
- name: Send Unit Test Status Notification (failure)
image: curlimages/curl
environment:
MATTERMOST_WEBHOOK_URL:
from_secret: mattermost_test_webhook
commands:
- |
BODY=$(printf '{"username":"WoodpeckerBot","text":"[%s - Build #%s] Unit test failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$MATTERMOST_WEBHOOK_URL"
depends_on:
- unit test
when:
- status: [failure]
- name: e2e test
image: mcr.microsoft.com/playwright:v1.58.0-noble
commands:
- corepack enable && corepack prepare pnpm@10.28.2 --activate
- pnpm install --frozen-lockfile || pnpm install
- pnpm run build
- npx serve dist -p 4173 &
- sleep 2
- CI=1 pnpm run test:e2e
- name: Send E2E Test Status Notification (failure)
image: curlimages/curl
environment:
MATTERMOST_WEBHOOK_URL:
from_secret: mattermost_test_webhook
commands:
- |
BODY=$(printf '{"username":"WoodpeckerBot","text":"[%s - Build #%s] E2E test failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$MATTERMOST_WEBHOOK_URL"
depends_on:
- e2e test
when:
- status: [failure]
- name: Send CI Pipeline Status Notification (success)
image: curlimages/curl
environment:
MATTERMOST_WEBHOOK_URL:
from_secret: mattermost_test_webhook
commands:
- |
BODY=$(printf '{"username":"WoodpeckerBot","text":"[%s - Build #%s] CI pipeline success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$MATTERMOST_WEBHOOK_URL"
depends_on:
- install
- lint
- build
- unit test
- e2e test
when:
- status: [success]