mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-04 09:06:07 +02:00
feat: Add format check step to CI workflows for .NET project
This commit is contained in:
@@ -18,6 +18,20 @@ jobs:
|
|||||||
- name: Run markdownlint
|
- name: Run markdownlint
|
||||||
run: bash scripts/lint-markdown.sh
|
run: bash scripts/lint-markdown.sh
|
||||||
|
|
||||||
|
format-check:
|
||||||
|
name: Format Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET 10
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: dotnet format src/EchoHub.slnx --verify-no-changes --verbosity diagnostic
|
||||||
|
|
||||||
detect-changes:
|
detect-changes:
|
||||||
name: Detect Changes
|
name: Detect Changes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -44,7 +58,7 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
name: Build & Test
|
name: Build & Test
|
||||||
needs: [lint-markdown, detect-changes]
|
needs: [lint-markdown, format-check, detect-changes]
|
||||||
if: needs.detect-changes.outputs.src_changed == 'true'
|
if: needs.detect-changes.outputs.src_changed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -73,7 +87,7 @@ jobs:
|
|||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
needs: [lint-markdown, detect-changes, test]
|
needs: [lint-markdown, format-check, detect-changes, test]
|
||||||
if: needs.detect-changes.outputs.src_changed == 'true'
|
if: needs.detect-changes.outputs.src_changed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -14,9 +14,23 @@ jobs:
|
|||||||
- name: Run markdownlint
|
- name: Run markdownlint
|
||||||
run: bash scripts/lint-markdown.sh
|
run: bash scripts/lint-markdown.sh
|
||||||
|
|
||||||
|
format-check:
|
||||||
|
name: Format Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET 10
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '10.0.x'
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: dotnet format src/EchoHub.slnx --verify-no-changes --verbosity diagnostic
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Build & Test
|
name: Build & Test
|
||||||
needs: lint-markdown
|
needs: [lint-markdown, format-check]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user