woodpecker/.woodpecker/web.yaml
Patrick Schratz 5b0d788737
Add vscode tailwind extensions & prettier tailwind linter, sort tailwind classes (#4622)
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
2024-12-31 14:03:21 +01:00

77 lines
1.5 KiB
YAML

when:
- event: pull_request
- event: push
branch:
- release/*
variables:
- &node_image 'docker.io/node:23-alpine'
- &when
path:
# related config files
- '.woodpecker/web.yaml'
# web source code
- 'web/**'
# api source code
- 'server/api/**'
steps:
install-dependencies:
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm install --frozen-lockfile
when: *when
prettier:
depends_on:
- install-dependencies
image: docker.io/woodpeckerci/plugin-prettier:next
pull: true
settings:
version: 3.3.3
plugins:
- 'prettier-plugin-tailwindcss'
- '@ianvs/prettier-plugin-sort-imports'
lint:
depends_on:
- install-dependencies
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm lint
when: *when
format-check:
depends_on:
- install-dependencies
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm format:check
when: *when
typecheck:
depends_on:
- install-dependencies
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm typecheck
when: *when
test:
depends_on:
- install-dependencies
- format-check # wait for it else test artifacts are falsely detected as wrong
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm test
when: *when