-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
82 lines (76 loc) · 1.87 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# CICD stages
stages:
- unit-tests
- functional-tests
- deploy
# The test script: Runs the functional, and unit tests of .NET Core
#
# TEST_PROJECT_NAME # The name of the csharp test project
.test_script: &test_script
image: mcr.microsoft.com/dotnet/core/sdk:3.1
tags:
- vanilla-dev
dependencies: []
script:
- echo "TEST_PROJECT_NAME=$TEST_PROJECT_NAME"
- dotnet restore ./$TEST_PROJECT_PATH/$TEST_PROJECT_NAME/$TEST_PROJECT_NAME.csproj
- dotnet test ./$TEST_PROJECT_PATH/$TEST_PROJECT_NAME/$TEST_PROJECT_NAME.csproj
test-library-cache:
<<: *test_script
stage: unit-tests
variables:
TEST_PROJECT_PATH: "libs/tests"
TEST_PROJECT_NAME: "COLID.Cache.Tests"
only:
- /^issues\/.*$/
- /^hotfixes\/.*$/
- develop
- release
- master
test-library-graph:
<<: *test_script
stage: unit-tests
variables:
TEST_PROJECT_PATH: "libs/tests"
TEST_PROJECT_NAME: "COLID.Graph.Tests"
only:
- /^issues\/.*$/
- /^hotfixes\/.*$/
- develop
- release
- master
test-registration-units:
<<: *test_script
stage: unit-tests
variables:
TEST_PROJECT_PATH: "tests"
TEST_PROJECT_NAME: "COLID.RegistrationService.Tests.Unit"
only:
- /^issues\/.*$/
- /^hotfixes\/.*$/
- develop
- release
- master
test-registration-functional:
<<: *test_script
stage: functional-tests
variables:
TEST_PROJECT_PATH: "tests"
TEST_PROJECT_NAME: "COLID.RegistrationService.Tests.Functional"
only:
- /^issues\/.*$/
- /^hotfixes\/.*$/
- develop
- release
- master
trigger-deployment:
stage: deploy
image: curlimages/curl
tags:
- dind-dev
script:
- curl -X POST -F token=$DEPLOYMENT_TOKEN -F ref=$CI_COMMIT_REF_NAME $DEPLOYMENT_REPO_URL
only:
- develop
- release
- master