ci: check_format, check_commits, compile_jvm and test_jvm steps

This commit is contained in:
Gleb Koval 2025-01-27 14:52:51 +00:00
parent 252ed1c925
commit a52b384782
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
2 changed files with 41 additions and 0 deletions

1
.commitlintrc.yml Normal file
View File

@ -0,0 +1 @@
extends: "@commitlint/config-conventional"

40
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,40 @@
stages:
- check
- compile
- test
default:
image: gumjoe/wacc-ci-scala:slim
check_format:
stage: check
before_script:
- cs install scalafmt
script:
- scalafmt --check . || echo "Run 'scala format' to fix formatting issues."
check_commits:
stage: check
image: node:lts-alpine
before_script:
- apk add git
- npm install -g @commitlint/cli @commitlint/config-conventional
- git pull origin master
script:
- npx commitlint --from origin/master --to HEAD --verbose
compile_jvm:
stage: compile
script:
- scala compile --platform jvm -Werror .
artifacts:
paths:
- .bsp/
- .scala-build/
test_jvm:
stage: test
dependencies:
- compile_jvm
script:
- scala test --platform jvm .