Skip to content

Commit

Permalink
ci: introduce commitlint
Browse files Browse the repository at this point in the history
From now on the repository follows convetialcommit guidelines.
The commitlint tools is there to enforce the law in CI.
  • Loading branch information
jakubcabal committed Nov 11, 2024
1 parent aad65d3 commit 72fc98c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/ci/check.gitlab-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,17 @@ pycodestyle:
entrypoint: [""]
script:
- sh tests/ci/pycodestyle.sh

commitlint:
stage: check
needs: []
image: registry.hub.docker.com/library/node:alpine
variables:
GIT_DEPTH: 0
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
before_script:
- apk add --no-cache git
- npm install --save-dev @commitlint/config-conventional @commitlint/cli
script:
- npx commitlint --extends '@commitlint/config-conventional' --from "${CI_MERGE_REQUEST_DIFF_BASE_SHA}" --to "${CI_COMMIT_SHA}"

0 comments on commit 72fc98c

Please sign in to comment.