2023-07-12 21:25:05 +00:00
|
|
|
when:
|
2024-01-10 14:10:56 +00:00
|
|
|
- event: pull_request
|
2023-08-07 11:03:23 +00:00
|
|
|
- event: push
|
2024-01-12 10:00:35 +00:00
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
- release/*
|
|
|
|
- renovate/*
|
2023-07-12 21:25:05 +00:00
|
|
|
|
2022-07-17 16:25:56 +00:00
|
|
|
variables:
|
2023-11-01 14:25:48 +00:00
|
|
|
- &node_image 'docker.io/node:21-alpine'
|
2023-08-07 11:03:23 +00:00
|
|
|
- &when
|
|
|
|
path:
|
|
|
|
# related config files
|
2024-01-11 17:43:54 +00:00
|
|
|
- '.woodpecker/web.yaml'
|
2023-08-07 11:03:23 +00:00
|
|
|
# web source code
|
2023-10-24 12:42:05 +00:00
|
|
|
- 'web/**'
|
2023-08-07 11:03:23 +00:00
|
|
|
# api source code
|
2023-10-24 12:42:05 +00:00
|
|
|
- 'server/api/**'
|
2022-07-17 16:25:56 +00:00
|
|
|
|
2023-06-30 11:32:17 +00:00
|
|
|
steps:
|
2024-01-10 14:10:56 +00:00
|
|
|
install-dependencies:
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *node_image
|
2022-10-25 12:51:29 +00:00
|
|
|
directory: web/
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
2022-10-08 14:15:07 +00:00
|
|
|
- corepack enable
|
|
|
|
- pnpm install --frozen-lockfile
|
2023-08-07 11:03:23 +00:00
|
|
|
when: *when
|
2021-11-30 16:46:19 +00:00
|
|
|
|
|
|
|
lint:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
2024-01-10 14:10:56 +00:00
|
|
|
- install-dependencies
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *node_image
|
2022-10-25 12:51:29 +00:00
|
|
|
directory: web/
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
2022-10-08 14:15:07 +00:00
|
|
|
- corepack enable
|
|
|
|
- pnpm lint
|
2023-08-07 11:03:23 +00:00
|
|
|
when: *when
|
2021-11-30 16:46:19 +00:00
|
|
|
|
|
|
|
formatcheck:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
2024-01-10 14:10:56 +00:00
|
|
|
- install-dependencies
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *node_image
|
2022-10-25 12:51:29 +00:00
|
|
|
directory: web/
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
2022-10-08 14:15:07 +00:00
|
|
|
- corepack enable
|
2023-08-03 21:11:52 +00:00
|
|
|
- pnpm format:check
|
2023-08-07 11:03:23 +00:00
|
|
|
when: *when
|
2021-11-30 16:46:19 +00:00
|
|
|
|
|
|
|
typecheck:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
2024-01-10 14:10:56 +00:00
|
|
|
- install-dependencies
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *node_image
|
2022-10-25 12:51:29 +00:00
|
|
|
directory: web/
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
2022-10-08 14:15:07 +00:00
|
|
|
- corepack enable
|
|
|
|
- pnpm typecheck
|
2023-08-07 11:03:23 +00:00
|
|
|
when: *when
|
2021-11-30 16:46:19 +00:00
|
|
|
|
|
|
|
test:
|
2023-12-28 15:39:14 +00:00
|
|
|
depends_on:
|
2024-01-10 14:10:56 +00:00
|
|
|
- install-dependencies
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *node_image
|
2022-10-25 12:51:29 +00:00
|
|
|
directory: web/
|
2021-11-30 16:46:19 +00:00
|
|
|
commands:
|
2022-10-08 14:15:07 +00:00
|
|
|
- corepack enable
|
|
|
|
- pnpm test
|
2023-08-07 11:03:23 +00:00
|
|
|
when: *when
|