woodpecker/.woodpecker/web.yml

69 lines
1.4 KiB
YAML
Raw Normal View History

variables:
- &node_image 'node:18-alpine'
- &when_path
# related config files
- ".woodpecker/web.yml"
# web source code
- "web/**"
steps:
deps:
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm install --frozen-lockfile
when:
path: *when_path
lint:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm lint
when:
path: *when_path
formatcheck:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm formatcheck
when:
path: *when_path
typecheck:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm typecheck
when:
path: *when_path
securitycheck:
group: test
image: aquasec/trivy:latest
commands:
- trivy fs --exit-code 0 --skip-dirs node_modules/ --severity UNKNOWN,LOW web/
2023-06-29 15:21:06 +00:00
# - trivy fs --exit-code 1 --skip-dirs node_modules/ --severity MEDIUM,HIGH,CRITICAL web/ # TODO
- trivy fs --exit-code 0 --skip-dirs node_modules/ --severity MEDIUM,HIGH,CRITICAL web/
# failure: ignore # TODO
when:
path: *when_path
test:
group: test
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm test
when:
path: *when_path