ds4/.woodpecker/checks.yaml

71 lines
1.4 KiB
YAML
Raw Normal View History

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 00:16:14 +02:00
- &node_image node:lts
- &enable_pnpm
- corepack enable
- corepack prepare pnpm@latest --activate
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:
image: *node_image
commands:
- <<: *enable_pnpm
- pnpm install --frozen-lockfile
lint:
group: check
image: *node_image
commands:
- <<: *enable_pnpm
- pnpm lint
formatcheck:
group: check
image: *node_image
commands:
- <<: *enable_pnpm
- pnpm format:check
typecheck:
group: check
image: *node_image
commands:
- <<: *enable_pnpm
- pnpm typecheck
test:
group: check
image: *node_image
commands:
- <<: *enable_pnpm
- pnpm test
reuse:
group: check
image: fsfe/reuse:latest
commands:
- reuse lint
commitlint:
group: check
image: *node_image
commands:
- <<: *enable_pnpm
- git fetch origin ${CI_COMMIT_TARGET_BRANCH}
2023-07-22 00:16:14 +02:00
- pnpm exec commitlint --from origin/${CI_COMMIT_TARGET_BRANCH}
when:
event: pull_request
build:
group: build
image: *node_image
commands:
- export APPDATA=$(pwd)
- <<: *enable_pnpm
- pnpm build