woodpecker/.woodpecker/web.yml

66 lines
1.1 KiB
YAML
Raw Normal View History

version: 1
when:
- event: [pull_request, tag]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
variables:
- &node_image 'docker.io/node:21-alpine'
- &when
path:
# related config files
2023-10-24 12:42:05 +00:00
- '.woodpecker/web.yml'
# web source code
2023-10-24 12:42:05 +00:00
- 'web/**'
# api source code
2023-10-24 12:42:05 +00:00
- 'server/api/**'
event: [pull_request, tag, deployment]
steps:
deps:
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm install --frozen-lockfile
when: *when
lint:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm lint
when: *when
formatcheck:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm format:check
when: *when
typecheck:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm typecheck
when: *when
test:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm test
when: *when