ci: enable Turbo remote cache + parallelize pipeline steps (#106)
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #106.
This commit is contained in:
@@ -5,9 +5,9 @@ variables:
|
|||||||
when:
|
when:
|
||||||
- event: [push, pull_request, manual]
|
- event: [push, pull_request, manual]
|
||||||
|
|
||||||
# Steps run sequentially to avoid OOM on the CI runner.
|
# Turbo remote cache is at turbo.mosaicstack.dev (ducktors/turborepo-remote-cache).
|
||||||
# node_modules is installed once by the install step and shared across
|
# TURBO_TOKEN is set as a Woodpecker secret. Turbo picks up TURBO_API, TURBO_TOKEN,
|
||||||
# all subsequent steps via Woodpecker's shared workspace volume.
|
# and TURBO_TEAM from the environment automatically.
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
install:
|
install:
|
||||||
@@ -18,14 +18,23 @@ steps:
|
|||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
|
environment:
|
||||||
|
TURBO_API: https://turbo.mosaicstack.dev
|
||||||
|
TURBO_TEAM: mosaic
|
||||||
|
secrets: [turbo_token]
|
||||||
commands:
|
commands:
|
||||||
- *enable_pnpm
|
- *enable_pnpm
|
||||||
- pnpm typecheck
|
- pnpm typecheck
|
||||||
depends_on:
|
depends_on:
|
||||||
- install
|
- install
|
||||||
|
|
||||||
|
# lint, format, and test are independent — run in parallel after typecheck
|
||||||
lint:
|
lint:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
|
environment:
|
||||||
|
TURBO_API: https://turbo.mosaicstack.dev
|
||||||
|
TURBO_TEAM: mosaic
|
||||||
|
secrets: [turbo_token]
|
||||||
commands:
|
commands:
|
||||||
- *enable_pnpm
|
- *enable_pnpm
|
||||||
- pnpm lint
|
- pnpm lint
|
||||||
@@ -38,20 +47,30 @@ steps:
|
|||||||
- *enable_pnpm
|
- *enable_pnpm
|
||||||
- pnpm format:check
|
- pnpm format:check
|
||||||
depends_on:
|
depends_on:
|
||||||
- lint
|
- typecheck
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
|
environment:
|
||||||
|
TURBO_API: https://turbo.mosaicstack.dev
|
||||||
|
TURBO_TEAM: mosaic
|
||||||
|
secrets: [turbo_token]
|
||||||
commands:
|
commands:
|
||||||
- *enable_pnpm
|
- *enable_pnpm
|
||||||
- pnpm test
|
- pnpm test
|
||||||
depends_on:
|
depends_on:
|
||||||
- format
|
- typecheck
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: *node_image
|
image: *node_image
|
||||||
|
environment:
|
||||||
|
TURBO_API: https://turbo.mosaicstack.dev
|
||||||
|
TURBO_TEAM: mosaic
|
||||||
|
secrets: [turbo_token]
|
||||||
commands:
|
commands:
|
||||||
- *enable_pnpm
|
- *enable_pnpm
|
||||||
- pnpm build
|
- pnpm build
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- lint
|
||||||
|
- format
|
||||||
- test
|
- test
|
||||||
|
|||||||
Reference in New Issue
Block a user