Skip to content

Commit

Permalink
ci: try to fix unittest triggering when skip tests message is included
Browse files Browse the repository at this point in the history
  • Loading branch information
Celeborn2BeAlive committed Sep 29, 2020
1 parent 71d55d3 commit 79cbf2d
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# a single stage allows test to run even if flake8 fails,
# and makes it possible to get all the errors at once
stages:
- pre_release
- pre_release # a single stage allows test to run even if flake8 fails and makes it possible to get all the errors at once
- release
- deploy

Expand All @@ -27,16 +25,22 @@ zip:
- mixer
expire_in: 1 week

# Note: you cannot extend this job with another only: variables job
# If you need that, you should rewrite and combine the rules
.only_on_gitlab.com:
only:
variables:
- $CI_SERVER_URL == "https://gitlab.com"

# Note: you cannot extend this job with another except: variables job
# If you need that, you should rewrite and combine the rules
.exclude_on_gitlab.com:
except:
variables:
- $CI_SERVER_URL == "https://gitlab.com"

# Note: you cannot extend this job with another only: variables job
# If you need that, you should rewrite and combine the rules
.on_version_tag:
only:
refs:
Expand Down Expand Up @@ -64,9 +68,6 @@ release:
stage: pre_release
tags:
- blender
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
variables:
MIXER_BLENDER_ZIP_BASENAME: blender-2.83.4-windows64
MIXER_BLENDER_VERSION_BASE: "2.83"
Expand All @@ -84,17 +85,27 @@ release:
reports:
junit:
- logs\tests\*.xml

unittest:
extends:
- .base_unittest
- .exclude_on_gitlab.com
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
- $CI_SERVER_URL == "https://gitlab.com"

unittest_gitlab.com:
extends:
- .base_unittest
- .only_on_gitlab.com
- .on_version_tag
except:
variables:
- $CI_COMMIT_MESSAGE =~ /\[skip-tests\]/
only:
refs:
# see inject_version.py
- /^v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$/
variables:
- $CI_SERVER_URL == "https://gitlab.com"

.deploy_network_folder:
extends:
Expand Down

0 comments on commit 79cbf2d

Please sign in to comment.