mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 11:51:02 +00:00
8da0ee47f7
use yaml aliases (https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases) to have pipeline `variables` Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> Co-authored-by: Anbraten <anton@ju60.de>
51 lines
785 B
YAML
51 lines
785 B
YAML
variables:
|
|
- &node_image 'node:16-alpine'
|
|
- &when_path
|
|
# web source code
|
|
- "web/**"
|
|
|
|
pipeline:
|
|
deps:
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- yarn install --frozen-lockfile
|
|
when:
|
|
path: *when_path
|
|
|
|
lint:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- yarn lint
|
|
when:
|
|
path: *when_path
|
|
|
|
formatcheck:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- yarn formatcheck
|
|
when:
|
|
path: *when_path
|
|
|
|
typecheck:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- yarn typecheck
|
|
when:
|
|
path: *when_path
|
|
|
|
test:
|
|
group: test
|
|
image: *node_image
|
|
commands:
|
|
- cd web/
|
|
- yarn test
|
|
when:
|
|
path: *when_path
|
|
|