ci: add pipeline for build and test

This commit is contained in:
Jindřich Moravec 2024-01-28 18:30:06 +01:00
parent a29306ed42
commit 9cef9caad2

16
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,16 @@
stages:
- primary
build-and-test:
stage: primary
image: rust:1.74.0
tags:
- shared-fi
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
# build and test in single job for faster execution
# because shared runner doesn't allow caching
- cargo build --verbose
- cargo test --verbose