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
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ dotnet_diagnostic.CA1010.severity = none

# Use collection expressions (C# 12+)
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
dotnet_diagnostic.CA1502.severity = warning

# Code block preferences
csharp_prefer_simple_default_expression = true:suggestion
Expand Down
21 changes: 13 additions & 8 deletions .github/steps/install_dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Install Dependencies
description: ""
description: "Install the pinned .NET SDK, required host prerequisites, and Uno workloads for CI validation."

inputs:
target-platform:
description: 'The platform to install dependencies for. #See available values at https://platform.uno/docs/articles/external/uno.check/doc/using-uno-check.html'
required: false
default: 'all'
dotnet-version:
description: 'Installs and sets the .NET SDK Version'
install-windows-sdk:
description: 'Whether to install the Windows SDK ISO bootstrap step. Leave false for normal dotnet-based CI validation.'
required: false
default: '10.0.x'
default: 'false'
run-uno-check:
description: 'Whether to run uno-check and install Uno workloads. Leave false for normal dotnet-based CI validation.'
required: false
default: 'false'
sdkVersion:
description: 'The version of the Windows Sdk'
required: false
Expand All @@ -19,20 +23,21 @@ runs:
using: "composite"
steps:
# Install .NET
- name: Setup .NET ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v3
- name: Setup .NET SDK from global.json
uses: actions/setup-dotnet@v5
with:
dotnet-version: '${{ inputs.dotnet-version }}'
global-json-file: 'global.json'

# Install Windows SDK
- name: Install Windows SDK ${{ inputs.sdkVersion }}
shell: pwsh
if: ${{ runner.os == 'Windows' }}
if: ${{ runner.os == 'Windows' && inputs.install-windows-sdk == 'true' }}
run: .\.github\Install-WindowsSdkISO.ps1 ${{ inputs.sdkVersion }}

# Run Uno.Check
- name: Install ${{ inputs.target-platform }} Workloads
shell: pwsh
if: ${{ inputs.run-uno-check == 'true' }}
run: |
dotnet tool install -g uno.check
("${{ inputs.target-platform }} ".Split(' ') | ForEach-Object {
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build Validation

on:
push:
branches:
- main
- release/**

pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- release/**
workflow_dispatch:

permissions:
contents: read

concurrency:
group: build-validation-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
name: Quality Gate
runs-on: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install Dependencies
timeout-minutes: 60
uses: "./.github/steps/install_dependencies"

- name: Build
shell: pwsh
run: dotnet build DotPilot.slnx -warnaserror

unit_tests:
name: Unit Test Suite
runs-on: windows-latest
timeout-minutes: 60
needs:
- build
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install Dependencies
timeout-minutes: 60
uses: "./.github/steps/install_dependencies"

- name: Run Unit Tests
shell: pwsh
run: dotnet test ./DotPilot.Tests/DotPilot.Tests.csproj --logger GitHubActions --blame-crash

coverage:
name: Coverage Suite
runs-on: windows-latest
timeout-minutes: 60
needs:
- build
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install Dependencies
timeout-minutes: 60
uses: "./.github/steps/install_dependencies"

- name: Run Coverage
shell: pwsh
run: dotnet test ./DotPilot.Tests/DotPilot.Tests.csproj --settings ./DotPilot.Tests/coverlet.runsettings --logger GitHubActions --blame-crash --collect:"XPlat Code Coverage"

ui_tests:
name: UI Test Suite
runs-on: macos-latest
timeout-minutes: 60
needs:
- build
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install Dependencies
timeout-minutes: 60
uses: "./.github/steps/install_dependencies"

- name: Run UI Tests
shell: bash
run: |
export UNO_UITEST_DRIVER_PATH="${CHROMEWEBDRIVER}"
export UNO_UITEST_CHROME_BINARY_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
export UNO_UITEST_BROWSER_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
dotnet test ./DotPilot.UITests/DotPilot.UITests.csproj --logger GitHubActions --blame-crash
60 changes: 0 additions & 60 deletions .github/workflows/ci.yml

This file was deleted.

Loading