From cb63d3fef870f69c6bd9d7323c60bacd94e665a7 Mon Sep 17 00:00:00 2001 From: Nadja Reitzenstein Date: Thu, 5 May 2022 19:40:54 +0200 Subject: [PATCH] Actually, only build if linting checks out. And make Gitlab CI work. --- .gitlab-ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 855813e..6a5d2fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,7 +62,7 @@ lint:fmt: # Check if the code builds on rust stable stable:build: stage: build - needs: [] + needs: ["lint:clippy", "lint:fmt"] only: - main - development @@ -89,19 +89,23 @@ stable:build: reports: junit: - report.xml + only: + - main + - development + - merge_requests # Run unit tests -unit test 1/3: +unit test 1:3: variables: TEST_TARGET: "--lib" extends: .tests -unit test 2/3: +unit test 2:3: variables: TEST_TARGET: "--bins" extends: .tests -unit test 3/3: +unit test 3:3: variables: TEST_TARGET: "--examples" extends: .tests @@ -166,4 +170,4 @@ build:docker-development: - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:dev-latest only: - - development \ No newline at end of file + - development