This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (50 loc) · 1.62 KB
/
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
name: Test
on:
repository_dispatch:
types: [game_version_update, game_version_update_patch]
push:
branches:
- master
paths:
- '.github/workflows/test.yml'
- 'src/**'
- 'build/**'
- 'tests/**'
pull_request:
branches:
- master
# will be triggered when undrafting or requesting review
types: [review_requested, ready_for_review]
paths:
- '.github/workflows/test.yml'
- 'src/**'
- 'build/**'
- 'tests/**'
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
#
MIN_VERSION: 'v1.1.0'
jobs:
test:
name: Test
runs-on: windows-latest
steps:
- name: Tests Setup
uses: butr/actions-tests-setup@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
steam-login: ${{secrets.STEAM_LOGIN}}
steam-password: ${{secrets.STEAM_PASSWORD}}
stable-version: ${{env.MIN_VERSION}}
- name: Test
run: >-
$game_version=$env:MIN_VERSION;
$game_version=$game_version.substring(1);
dotnet test tests/Bannerlord.BUTRLoader.Tests/Bannerlord.BUTRLoader.Tests.csproj --configuration Debug -p:GameVersion=$game_version -p:GameFolder="$PWD/bannerlord";
dotnet test tests/Bannerlord.BUTRLoader.Tests/Bannerlord.BUTRLoader.Tests.csproj --configuration Release -p:GameVersion=$game_version -p:GameFolder="$PWD/bannerlord";
shell: pwsh