From 9cef9caad233f706bec25890a226bc21aac63d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20Moravec?= Date: Sun, 28 Jan 2024 18:30:06 +0100 Subject: [PATCH] ci: add pipeline for build and test --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..27f39e7 --- /dev/null +++ b/.gitlab-ci.yml @@ -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