From a52b384782515565611f8ae0524f9661e22bcdd9 Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Mon, 27 Jan 2025 14:52:51 +0000 Subject: [PATCH] ci: check_format, check_commits, compile_jvm and test_jvm steps --- .commitlintrc.yml | 1 + .gitlab-ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .commitlintrc.yml create mode 100644 .gitlab-ci.yml diff --git a/.commitlintrc.yml b/.commitlintrc.yml new file mode 100644 index 0000000..175ef04 --- /dev/null +++ b/.commitlintrc.yml @@ -0,0 +1 @@ +extends: "@commitlint/config-conventional" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..dead37e --- /dev/null +++ b/.gitlab-ci.yml @@ -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 .