Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/local-gates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,31 @@ jobs:
shell: pwsh
run: npm run test:il2cpp-conversion-inputs

- name: Setup .NET for CSharpier on Windows
if: matrix.phase == 'orchestration'
id: windows-formatter-dotnet
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/unity-helpers-dotnet
with:
dotnet-version: "10.0.403"

- name: Require the installed CSharpier SDK on Windows
if: matrix.phase == 'orchestration'
shell: bash
env:
EXPECTED_DOTNET_SDK: ${{ steps.windows-formatter-dotnet.outputs.dotnet-version }}
run: |
set -euo pipefail
selected_sdk="$(dotnet --version | tr -d '\r')"
printf 'Selected CSharpier SDK: %s\n' "$selected_sdk"
test "$selected_sdk" = "${EXPECTED_DOTNET_SDK:?Missing installed CSharpier SDK version}"

- name: Verify C# formatting on Windows
if: matrix.phase == 'orchestration'
shell: pwsh
run: npm run format:csharp:check

assembly-tools-windows:
name: Assembly tools (Windows)
needs: windows-tool-phases
Expand Down
17 changes: 17 additions & 0 deletions scripts/tests/test_typecheck_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ def test_all_pinned_sdk_installations_have_controls() -> None:
("local-gates.yml", "contract-suites", "dotnet"),
("local-gates.yml", "contract-suites", "formatter-dotnet"),
("local-gates.yml", "typecheck-phases", "dotnet"),
("local-gates.yml", "windows-tool-phases", "windows-formatter-dotnet"),
("random-quality.yml", "battery", "dotnet"),
("random-quality.yml", "resolve", "dotnet"),
("random-quality.yml", "testu01", "dotnet"),
Expand Down Expand Up @@ -646,6 +647,22 @@ def test_windows_phases_preserve_every_suite_and_bounded_concurrency() -> None:
assert phase["timeout-minutes"] == 10
assert phase["runs-on"] == "windows-latest"
assert "continue-on-error" not in phase
phase_steps = steps(phase)
formatter_setup = next(
(
index
for index, step in enumerate(phase_steps)
if step.get("id") == "windows-formatter-dotnet"
),
None,
)
assert formatter_setup is not None, "Windows must install the CSharpier SDK before running it."
formatter_steps = phase_steps[formatter_setup : formatter_setup + 3]
assert len(formatter_steps) == 3
assert all(step["if"] == "matrix.phase == 'orchestration'" for step in formatter_steps)
assert all("continue-on-error" not in step for step in formatter_steps)
assert formatter_steps[2]["shell"] == "pwsh"
assert formatter_steps[2]["run"] == "npm run format:csharp:check"
publication_controls = [
step for step in steps(phase) if step.get("run") == "npm run test:unity-test-filter"
]
Expand Down
Loading