From be2159227e3c0e3e559f396b0a987c32158fd3bc Mon Sep 17 00:00:00 2001 From: Max Luebke Date: Mon, 6 Mar 2023 17:48:24 +0100 Subject: [PATCH] ci: Only build and test on merge request --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf624995d..3b98dd640 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,6 +34,8 @@ build-poet: # This job runs in the build stage, which runs first. - mkdir build && cd build - cmake .. - make -j$(nproc) + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' test-poet: stage: test @@ -41,6 +43,8 @@ test-poet: - mkdir build_test && cd build_test - cmake -DPOET_ENABLE_TESTING=ON .. - make -j$(nproc) check + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' archive-sources: # This job runs in the build stage, which runs first. image: python:3