Skip to content
Prev Previous commit
Next Next commit
Add format workflow
  • Loading branch information
Happypig375 committed Jan 28, 2026
commit 4e8bed36287ee36caad5d03067029c58ccb6d0b8
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ csharp_style_expression_bodied_operators = true

# Code-block preferences
csharp_prefer_braces = false
csharp_style_namespace_declarations = block_scoped
csharp_style_namespace_declarations = file_scoped

#### C# Formatting Rules ####

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/Benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Benchmark

on: push
on: [push, pull_request]
jobs:
Rendering:
if: (github.event_name == 'pull_request') == github.event.pull_request.head.repo.fork
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check format

on: [push, pull_request]
jobs:
Everything:
if: (github.event_name == 'pull_request') == github.event.pull_request.head.repo.fork
runs-on: windows-latest
steps:
- uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x'
- uses: actions/checkout@v6
with:
submodules: 'recursive'
- name: Check formatting
run: dotnet format --verify-no-changes
3 changes: 2 additions & 1 deletion .github/workflows/Nightly.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Upload test results and nightly builds

on: push
on: [push, pull_request]
jobs:
Everything:
if: (github.event_name == 'pull_request') == github.event.pull_request.head.repo.fork
runs-on: windows-latest
steps:
- name: Update draft on GitHub Releases
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/Test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build and Test

on: push
on: [push, pull_request]
jobs:
Everything:
if: (github.event_name == 'pull_request') == github.event.pull_request.head.repo.fork
strategy:
fail-fast: false # Don't cancel other os builds if one fails
matrix:
Expand Down
1 change: 1 addition & 0 deletions CSharpMath.sln
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{86C13BAB-EE19-4E82-B36F-2FEE92754B30}"
ProjectSection(SolutionItems) = preProject
.github\workflows\Benchmark.yml = .github\workflows\Benchmark.yml
.github\workflows\Format.yml = .github\workflows\Format.yml
.github\workflows\Nightly.yml = .github\workflows\Nightly.yml
.github\workflows\Release.yml = .github\workflows\Release.yml
.github\workflows\Test.yml = .github\workflows\Test.yml
Expand Down
Loading