woodpecker/.woodpecker/web.yaml
2024-05-02 22:03:11 +02:00

65 lines
1.1 KiB
YAML

when:
- event: pull_request
- event: push
branch:
- release/*
- renovate/*
variables:
- &bun_image 'docker.io/oven/bun:1.0-alpine'
- &when
path:
# related config files
- '.woodpecker/web.yaml'
# web source code
- 'web/**'
# api source code
- 'server/api/**'
steps:
install-dependencies:
image: *bun_image
directory: web/
commands:
- bun install --frozen-lockfile
when: *when
lint:
depends_on:
- install-dependencies
image: *bun_image
directory: web/
commands:
# - corepack enable
- bun lint
when: *when
formatcheck:
depends_on:
- install-dependencies
image: *bun_image
directory: web/
commands:
# - corepack enable
- bun format:check
when: *when
typecheck:
depends_on:
- install-dependencies
image: *bun_image
directory: web/
commands:
# - corepack enable
- bun typecheck
when: *when
test:
depends_on:
- install-dependencies
image: *bun_image
directory: web/
commands:
# - corepack enable
- bun test
when: *when