ci: check format, commits, compilation and tests #1

Merged
gk1623 merged 5 commits from ci-setup into master 2025-01-27 21:30:37 +00:00
7 changed files with 80 additions and 24 deletions
Showing only changes of commit a52b384782 - Show all commits

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 .