49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
# SPDX-FileCopyrightText: 2023 Johannes Loher
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
$schema: https://raw.githubusercontent.com/woodpecker-ci/woodpecker/master/pipeline/schema/schema.json
|
|
|
|
variables:
|
|
- &node_image node:lts
|
|
|
|
when:
|
|
- event: push
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
- event: pull_request
|
|
- event: tag
|
|
- event: manual
|
|
|
|
steps:
|
|
install:
|
|
image: *node_image
|
|
commands:
|
|
- yarn config set cacheFolder "$CI_WORKSPACE/.yarn/cache"
|
|
- pwd
|
|
- echo $CI_WORKSPACE
|
|
- yarn install --immutable
|
|
lint:
|
|
group: check
|
|
image: *node_image
|
|
commands:
|
|
- yarn config set cacheFolder "$CI_WORKSPACE/.yarn/cache"
|
|
- yarn lint
|
|
reuse:
|
|
group: check
|
|
image: fsfe/reuse:latest
|
|
commands:
|
|
- reuse lint
|
|
commitlint:
|
|
group: check
|
|
image: *node_image
|
|
commands:
|
|
- git fetch
|
|
- yarn run commitlint --from origin/${CI_COMMIT_TARGET_BRANCH}
|
|
when:
|
|
event: pull_request
|
|
build:
|
|
group: build
|
|
image: *node_image
|
|
commands:
|
|
- export APPDATA=$(pwd)
|
|
- yarn build
|