-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
58 lines (55 loc) · 2.06 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
stages:
- Test
- Deploy
image: mcr.microsoft.com/dotnet/sdk:6.0
Test:
stage: Test
script:
- cd MazeTests
- dotnet add package JUnitTestLogger --version 1.1.0
- dotnet test --logger "junit;LogFilePath=../TestResults/MazeTests.xml" --test-adapter-path:. /p:EnableWindowsTargeting=true
- cd ../MazeRecursionTests
- dotnet add package JUnitTestLogger --version 1.1.0
- dotnet test --logger "junit;LogFilePath=../TestResults/MazeRecursionTests.xml" --test-adapter-path:. /p:EnableWindowsTargeting=true
- cd ../MazeHuntKillTests
- dotnet add package JUnitTestLogger --version 1.1.0
- dotnet test --logger "junit;LogFilePath=../TestResults/MazeHuntKillTests.xml" --test-adapter-path:. /p:EnableWindowsTargeting=true
artifacts:
paths:
- ./TestResults/*Tests.xml
reports:
junit:
- ./TestResults/*Tests.xml
expire_in: 1 week
only:
- merge_requests
Deploy:
stage: Deploy
script:
- apt-get update -y
- apt-get install -y gnupg
- echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections
- apt install -y software-properties-common
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
- add-apt-repository "deb http://archive.ubuntu.com/ubuntu focal universe"
- add-apt-repository "deb http://archive.ubuntu.com/ubuntu focal main universe restricted multiverse"
- apt update -y
- apt install -y ttf-mscorefonts-installer
- apt-get install -y fontconfig
- fc-cache -f
- fc-match Arial
- apt-get install -y zip
- cd MazeGame
- dotnet publish -c Release -r win-x64 --output ./publish /p:EnableWindowsTargeting=true
- cp -r ../nlog.config.xml ./publish
- zip -r MazeGame.zip ./publish
artifacts:
paths:
- MazeGame/MazeGame.zip
expire_in: 2 weeks
variables:
EnableDocker: "false"
EnableWindowsTargeting: "true"
only:
- merge_requests