Skip to content

Commit 9b58f32

Browse files
committed
github actions test
1 parent ba6d990 commit 9b58f32

File tree

3 files changed

+64
-2
lines changed

3 files changed

+64
-2
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Building Master
2+
on:
3+
push:
4+
5+
jobs:
6+
setup:
7+
runs-on: [self-hosted, linux]
8+
steps:
9+
- name: Checking out repository
10+
uses: actions/checkout@v5
11+
12+
- name: Install dependencies for Nitrox
13+
run: dotnet restore
14+
15+
build:
16+
needs: setup
17+
runs-on: [self-hosted, linux]
18+
strategy:
19+
matrix:
20+
configuration: [Debug, Release]
21+
steps:
22+
- name: Build
23+
run: dotnet build Nitrox.sln -c ${{ matrix.configuration }} --no-restore
24+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Building Pull Request
2+
on:
3+
push:
4+
paths-ignore:
5+
- '**/PirateDetection.cs'
6+
7+
jobs:
8+
setup:
9+
runs-on: [self-hosted, linux]
10+
steps:
11+
- name: Checking out repository
12+
uses: actions/checkout@v5
13+
14+
- name: Install dependencies for Nitrox
15+
run: dotnet restore
16+
17+
build:
18+
needs: setup
19+
runs-on: [self-hosted, linux]
20+
strategy:
21+
matrix:
22+
configuration: [Debug, Release]
23+
steps:
24+
- name: Build
25+
run: dotnet build Nitrox.sln -c ${{ matrix.configuration }} --no-restore
26+
27+
test:
28+
needs: build
29+
runs-on: [self-hosted, linux]
30+
steps:
31+
- name: Run Tests
32+
continue-on-error: true
33+
run: dotnet test Nitrox.Test/bin/Debug/net9.0/Nitrox.Test.dll --logger trx --no-build --results-directory "TestResults"
34+
- name: Upload Test Results
35+
uses: EnricoMi/publish-unit-test-result-action/linux@v2
36+
if: (!cancelled())
37+
with:
38+
files: |
39+
TestResults/*.trx

Directory.Build.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@
4545
<DiscoverGame GameName="Subnautica" IntermediateOutputPath="$(IntermediateOutputPath)">
4646
<Output TaskParameter="GamePath" PropertyName="GameDir" />
4747
</DiscoverGame>
48-
<Error Condition="'$(GameDir)' == ''" Text="Failed to find the game 'Subnautica' on your machine" />
4948
<PropertyGroup>
50-
<GameDir>$(GameDir)\</GameDir>
49+
<GameDir>/home/docker/Subnautica/</GameDir>
5150
<GameDataFolder>Subnautica_Data</GameDataFolder>
5251
</PropertyGroup>
5352
<PropertyGroup Condition="$(_IsMacOS)">

0 commit comments

Comments
 (0)