forked from AdventureTimeSS14/space_station
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
85 lines (78 loc) · 2.07 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
83
84
85
stages:
- install
- build
- test
install-dep:
stage: install
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_UPDATE_FLAGS: --init --depth 50 --recursive --jobs 4
before_script:
- \[ -d ../artifacts \] || mkdir ../artifacts
script:
- echo "Install dependenses ..."
build-project:
stage: build
variables:
GITHUB_ACTIONS: 1
GIT_CLEAN_FLAGS: none
GIT_CHECKOUT: none
dependencies: []
script:
- |
echo "Restore Projects ..."
dotnet restore
echo "Build Projects ..."
dotnet build --configuration Release --no-restore /p:WarningsAsErrors= /m
dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj --no-build
echo "Compile complete."
yaml-test:
stage: test
variables:
GITHUB_ACTIONS: 1
GIT_CLEAN_FLAGS: none
GIT_CHECKOUT: none
dependencies: []
script:
- dotnet run --project Content.YAMLLinter/Content.YAMLLinter.csproj --no-build
content-test:
stage: test
needs: ["yaml-test"]
variables:
GITHUB_ACTIONS: 1
GIT_CLEAN_FLAGS: none
GIT_CHECKOUT: none
dependencies: []
before_script:
- \[ -d ../artifacts \] || mkdir ../artifacts
script:
- dotnet test --configuration Tools --no-build Content.Tests/Content.Tests.csproj --logger "junit;LogFilePath=../artifacts/content-tests.xml"
artifacts:
paths:
- ./artifacts/content-tests.xml
reports:
junit: ./artifacts/content-tests.xml
unit-test:
stage: test
needs: ["yaml-test"]
variables:
DOTNET_gcServer: 1
GITHUB_ACTIONS: 1
GIT_CLEAN_FLAGS: none
GIT_CHECKOUT: none
dependencies: []
before_script:
- \[ -d ../artifacts \] || mkdir ../artifacts
script:
- dotnet test --configuration Tools --no-build Content.IntegrationTests/Content.IntegrationTests.csproj --logger "junit;LogFilePath=../artifacts/unit-tests.xml"
artifacts:
paths:
- ./artifacts/unit-tests.xml
reports:
junit: ./artifacts/unit-tests.xml
remove-build:
stage: .post
when: on_failure
script:
- cd ..
- rm -R space_station