Repository navigation
71 lines (56 loc) · 2.19 KB
/
Copy pathprotocol-tests.yml
File metadata and controls
71 lines (56 loc) · 2.19 KB
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
name: Protocol Tests
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
v1-deletion-gate:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ripgrep
- name: Test V1 deletion gate against isolated fixtures
run: python3 tools/tests/test_verify_no_v1_runtime.py
- name: Reject V1 daemon runtime references
run: pwsh -NoProfile -File tools/VerifyNoV1Runtime.ps1
protocol-tests:
runs-on: windows-latest
# Backstop only. The blame collector below should name the stuck test first;
# without this a hang would burn the 6-hour default before anyone notices.
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore MCServerLauncher.slnx
- name: Build solution (Release)
run: dotnet build MCServerLauncher.slnx -c Release --no-restore
- name: Verify generated protocol documentation
run: dotnet run --project tools/MCServerLauncher.ProtocolDocs/MCServerLauncher.ProtocolDocs.csproj -c Release --no-build -- --check
- name: Run protocol tests (Release)
run: dotnet test tests/MCServerLauncher.ProtocolTests/MCServerLauncher.ProtocolTests.csproj -c Release --no-build --logger "console;verbosity=detailed" --blame-hang --blame-hang-timeout 8m --blame-hang-dump-type mini --results-directory TestResults
# if: always() is the point: the artifacts that name a hang only exist on the
# run that failed or was killed.
- name: Upload hang diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: protocol-tests-hang-diagnostics
path: TestResults
if-no-files-found: ignore