mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-06 08:16:19 +02:00
f56d0812c7
This partially reverts commit f9dd6518c0
.
67 lines
1.2 KiB
YAML
67 lines
1.2 KiB
YAML
variables:
|
|
- &node_image 'node:16-alpine'
|
|
- &when_path
|
|
# related config files
|
|
- ".woodpecker/web.yml"
|
|
# web source code
|
|
- "web/**"
|
|
|
|
pipeline:
|
|
deps:
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- corepack enable
|
|
- pnpm install --frozen-lockfile
|
|
when:
|
|
path: *when_path
|
|
|
|
lint:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- corepack enable
|
|
- pnpm lint
|
|
when:
|
|
path: *when_path
|
|
|
|
formatcheck:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- corepack enable
|
|
- pnpm formatcheck
|
|
when:
|
|
path: *when_path
|
|
|
|
typecheck:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- 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/
|
|
- trivy fs --exit-code 1 --skip-dirs node_modules/ --severity MEDIUM,HIGH,CRITICAL web/
|
|
when:
|
|
path: *when_path
|
|
|
|
test:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- corepack enable
|
|
- pnpm test
|
|
when:
|
|
path: *when_path
|