-
Notifications
You must be signed in to change notification settings - Fork 52
85 lines (66 loc) · 2.68 KB
/
deploy_test.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
name: Deploy test
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build TEST
runs-on: zk
steps:
- name: Setup MSBuild Path
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Setup VSTest.console.exe
uses: darenm/Setup-VSTest@v1
- name: Checkout
uses: actions/checkout@v2
with:
clean: true
- name: Restore NuGet Packages
run: nuget restore Zero-K.sln
- name: Build entire Zero-K
run: >
msbuild /t:Rebuild /p:Configuration=Release /p:Platform=x64
/p:DeployOnBuild=true /p:PublishProfile=Profile1
/p:DefineConstants="RELEASE;TRACE;TEST"
Zero-K.sln
shell: cmd
- name: Run VSTest
run: vstest.console.exe /Platform:x64 /Framework:Framework45 /TestCaseFilter:TestCategory=Basic /Parallel /Logger:trx;LogFileName=test-results.trx ./Tests/bin/release/net48/Tests.dll
shell: cmd
- name: Copy steam pipeline files
run: |
robocopy SteamRoot c:\projekty\test.zero-k.info\steamworks\tools\ContentBuilder\content /e
robocopy SteamScripts c:\projekty\test.zero-k.info\steamworks\tools\ContentBuilder\scripts /e
if ErrorLevel 8 (exit /B 1) else (exit /B 0)
shell: cmd
- name: Stop IIS
run: c:\Windows\System32\inetsrv\appcmd.exe stop apppool test.zero-k.info
- name: Migrate database
run: MigrateDatabase\bin\release\MigrateDatabase.exe
- name: Deploy website
run: |
robocopy zero-k.info\Deploy c:\projekty\test.zero-k.info\www /e
if ErrorLevel 8 (exit /B 1) else (exit /B 0)
shell: cmd
- name: Deploy ZKL
run: |
copy /Y ChobbyLauncher\bin\release\Zero-K.exe c:\projekty\test.zero-k.info\www\lobby
copy /Y ChobbyLauncher\bin\release\Zero-K.version.txt c:\projekty\test.zero-k.info\www\lobby
shell: cmd
- name: Start IIS
if: success() || failure() # run this step even if previous step failed
run: c:\Windows\System32\inetsrv\appcmd.exe start apppool test.zero-k.info
- name: Deploy presskit
run: |
robocopy presskit c:\projekty\test.zero-k.info\presskit /e
if ErrorLevel 8 (exit /B 1) else (exit /B 0)
shell: cmd