2023-07-12 23:25:05 +02:00
|
|
|
when:
|
2024-01-10 16:10:56 +02:00
|
|
|
- event: pull_request
|
2023-08-07 13:03:23 +02:00
|
|
|
- event: push
|
2024-01-12 12:00:35 +02:00
|
|
|
branch:
|
|
|
|
- release/*
|
|
|
|
- renovate/*
|
2023-07-12 23:25:05 +02:00
|
|
|
|
2022-07-17 18:25:56 +02:00
|
|
|
variables:
|
2024-10-20 11:19:18 +02:00
|
|
|
- &node_image 'docker.io/node:23-alpine'
|
2023-08-07 13:03:23 +02:00
|
|
|
- &when
|
|
|
|
path:
|
|
|
|
# related config files
|
2024-01-11 19:43:54 +02:00
|
|
|
- '.woodpecker/web.yaml'
|
2023-08-07 13:03:23 +02:00
|
|
|
# web source code
|
2023-10-24 14:42:05 +02:00
|
|
|
- 'web/**'
|
2023-08-07 13:03:23 +02:00
|
|
|
# api source code
|
2023-10-24 14:42:05 +02:00
|
|
|
- 'server/api/**'
|
2022-07-17 18:25:56 +02:00
|
|
|
|
2023-06-30 13:32:17 +02:00
|
|
|
steps:
|
2024-01-10 16:10:56 +02:00
|
|
|
install-dependencies:
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *node_image
|
2022-10-25 14:51:29 +02:00
|
|
|
directory: web/
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
2022-10-08 16:15:07 +02:00
|
|
|
- corepack enable
|
|
|
|
- pnpm install --frozen-lockfile
|
2023-08-07 13:03:23 +02:00
|
|
|
when: *when
|
2021-11-30 18:46:19 +02:00
|
|
|
|
|
|
|
lint:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
2024-01-10 16:10:56 +02:00
|
|
|
- install-dependencies
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *node_image
|
2022-10-25 14:51:29 +02:00
|
|
|
directory: web/
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
2022-10-08 16:15:07 +02:00
|
|
|
- corepack enable
|
|
|
|
- pnpm lint
|
2023-08-07 13:03:23 +02:00
|
|
|
when: *when
|
2021-11-30 18:46:19 +02:00
|
|
|
|
2024-05-24 22:35:04 +02:00
|
|
|
format-check:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
2024-01-10 16:10:56 +02:00
|
|
|
- install-dependencies
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *node_image
|
2022-10-25 14:51:29 +02:00
|
|
|
directory: web/
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
2022-10-08 16:15:07 +02:00
|
|
|
- corepack enable
|
2023-08-03 23:11:52 +02:00
|
|
|
- pnpm format:check
|
2023-08-07 13:03:23 +02:00
|
|
|
when: *when
|
2021-11-30 18:46:19 +02:00
|
|
|
|
|
|
|
typecheck:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
2024-01-10 16:10:56 +02:00
|
|
|
- install-dependencies
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *node_image
|
2022-10-25 14:51:29 +02:00
|
|
|
directory: web/
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
2022-10-08 16:15:07 +02:00
|
|
|
- corepack enable
|
|
|
|
- pnpm typecheck
|
2023-08-07 13:03:23 +02:00
|
|
|
when: *when
|
2021-11-30 18:46:19 +02:00
|
|
|
|
|
|
|
test:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
2024-01-10 16:10:56 +02:00
|
|
|
- install-dependencies
|
2024-09-20 22:24:22 +02:00
|
|
|
- format-check # wait for it else test artifacts are falsely detected as wrong
|
2022-07-17 18:25:56 +02:00
|
|
|
image: *node_image
|
2022-10-25 14:51:29 +02:00
|
|
|
directory: web/
|
2021-11-30 18:46:19 +02:00
|
|
|
commands:
|
2022-10-08 16:15:07 +02:00
|
|
|
- corepack enable
|
|
|
|
- pnpm test
|
2023-08-07 13:03:23 +02:00
|
|
|
when: *when
|