2023-06-29 21:53:50 +02:00
|
|
|
# SPDX-FileCopyrightText: 2023 Johannes Loher
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json
|
|
|
|
|
|
|
|
variables:
|
2023-07-22 02:49:47 +02:00
|
|
|
- &bun_image oven/bun:latest
|
2023-06-29 21:53:50 +02:00
|
|
|
|
|
|
|
when:
|
2023-07-22 00:16:14 +02:00
|
|
|
- event: push
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
- event: pull_request
|
|
|
|
- event: tag
|
|
|
|
- event: manual
|
2023-06-29 21:53:50 +02:00
|
|
|
|
|
|
|
steps:
|
2023-07-22 00:16:14 +02:00
|
|
|
install:
|
2023-07-22 02:49:47 +02:00
|
|
|
image: *bun_image
|
2023-07-22 00:16:14 +02:00
|
|
|
commands:
|
2023-07-22 02:49:47 +02:00
|
|
|
- bun install --frozen-lockfile
|
2023-07-22 00:16:14 +02:00
|
|
|
lint:
|
|
|
|
group: check
|
2023-07-22 02:49:47 +02:00
|
|
|
image: *bun_image
|
2023-07-22 00:16:14 +02:00
|
|
|
commands:
|
2023-07-22 02:49:47 +02:00
|
|
|
- bun run lint
|
2023-07-22 00:16:14 +02:00
|
|
|
formatcheck:
|
|
|
|
group: check
|
2023-07-22 02:49:47 +02:00
|
|
|
image: *bun_image
|
2023-07-22 00:16:14 +02:00
|
|
|
commands:
|
2023-07-22 02:49:47 +02:00
|
|
|
- bun run format:check
|
2023-07-22 00:16:14 +02:00
|
|
|
typecheck:
|
|
|
|
group: check
|
2023-07-22 02:49:47 +02:00
|
|
|
image: *bun_image
|
2023-07-22 00:16:14 +02:00
|
|
|
commands:
|
2023-07-22 02:49:47 +02:00
|
|
|
- bun run typecheck
|
2023-07-22 00:16:14 +02:00
|
|
|
test:
|
|
|
|
group: check
|
2023-07-22 02:49:47 +02:00
|
|
|
image: *bun_image
|
2023-07-22 00:16:14 +02:00
|
|
|
commands:
|
2023-07-22 02:49:47 +02:00
|
|
|
- bun run test
|
2023-07-22 00:16:14 +02:00
|
|
|
reuse:
|
|
|
|
group: check
|
|
|
|
image: fsfe/reuse:latest
|
|
|
|
commands:
|
|
|
|
- reuse lint
|
|
|
|
commitlint:
|
|
|
|
group: check
|
2023-07-22 02:49:47 +02:00
|
|
|
image: *bun_image
|
2023-07-22 00:16:14 +02:00
|
|
|
commands:
|
2023-07-22 02:49:47 +02:00
|
|
|
- apt-get update
|
|
|
|
- apt-get install git -y
|
2023-07-22 00:34:20 +02:00
|
|
|
- git fetch origin ${CI_COMMIT_TARGET_BRANCH}
|
2023-07-22 02:49:47 +02:00
|
|
|
- bunx commitlint --from origin/${CI_COMMIT_TARGET_BRANCH}
|
2023-07-22 00:16:14 +02:00
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
build:
|
|
|
|
group: build
|
2023-07-22 02:49:47 +02:00
|
|
|
image: *bun_image
|
2023-07-22 00:16:14 +02:00
|
|
|
commands:
|
|
|
|
- export APPDATA=$(pwd)
|
2023-07-22 02:49:47 +02:00
|
|
|
- bun run build
|