Skip to content
Snippets Groups Projects
Commit 0dd9364b authored by Lingkai Dong's avatar Lingkai Dong
Browse files

ci: Do not repeat tests after merging MR to main


This project's GitLab repository only permits fast forward merges,
meaning that the SHA1 of the target branch (e.g. main) is always that
of the last merged merge request. Save CI resources and minimize delays
to mirroring to the public GitLab, by not rerunning tests on identical
SHA1.

Refactor rules for tests into a YAML anchor, to build and run tests when
a CI pipeline is triggered by *any* of:
* a merge request
* a release branch
* web UI

Pushes to non-release branches, including main and component auto update
branches, do not cause tests to be built and run.

Signed-off-by: Lingkai Dong's avatarLingkai Dong <lingkai.dong@arm.com>
parent e8dafc6a
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,11 @@ autobot:
rules:
- if: $UPDATE_SDK_COMPONENTS == "true"
.test-rules: &test-rules
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_REF_NAME =~ /^release-.*/
- if: $CI_PIPELINE_SOURCE == "web"
unit-tests:
tags:
- iotmsw-amd64
......@@ -74,8 +79,7 @@ unit-tests:
path: __build/coverage.xml
paths:
- __build/html/
rules:
- if: $UPDATE_SDK_COMPONENTS != "true"
rules: *test-rules
# This fragment contains base variables required by a pipeline.
# It can be used to set matrix parameters and extended using << : .anchor syntax
......@@ -107,8 +111,7 @@ unit-tests:
TEST: $TEST
TOOLCHAIN: $TOOLCHAIN
PLATFORM: $PLATFORM
rules:
- if: $UPDATE_SDK_COMPONENTS != "true"
rules: *test-rules
build-test-fvp-armclang:
extends: .build-test-fvp-base
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment