mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
Refactor and update various components of EchoHub.Server
- Updated launchSettings.json for consistency. - Refactored FileValidationHelper to improve image validation logic. - Enhanced ServerDirectoryService for better connection handling and user count updates. - Improved DatabaseSetup for legacy database handling and seeding default channels. - Refined FirstRunSetup to ensure JWT secret generation. - Removed appsettings.Development.json as it is no longer needed. - Updated EchoHub.Tests project file for consistency. - Added unit tests for FileValidationHelper and PresenceTracker with improved assertions. - Updated ValidationConstantsTests to ensure regex validations are correct. - Cleaned up solution file formatting for better readability.
This commit is contained in:
@@ -1,65 +1,65 @@
|
||||
name: PR Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
lint-markdown:
|
||||
name: Markdown Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run markdownlint
|
||||
run: bash scripts/lint-markdown.sh
|
||||
|
||||
test:
|
||||
name: Build & Test
|
||||
needs: lint-markdown
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check for src/ changes
|
||||
id: changes
|
||||
env:
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
run: |
|
||||
git fetch origin "$BASE_REF" --depth=1
|
||||
CHANGED=$(git diff --name-only "origin/$BASE_REF"...HEAD -- 'src/' | wc -l)
|
||||
if [ "$CHANGED" -gt 0 ]; then
|
||||
echo "src_changed=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "src_changed=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Setup .NET 10
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
|
||||
- name: Cache NuGet packages
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: nuget-${{ runner.os }}-${{ hashFiles('src/**/*.csproj') }}
|
||||
restore-keys: nuget-${{ runner.os }}-
|
||||
|
||||
- name: Restore dependencies
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
run: dotnet restore src/EchoHub.slnx
|
||||
|
||||
- name: Build
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
run: dotnet build src/EchoHub.slnx --no-restore --configuration Release
|
||||
|
||||
- name: Test
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
run: dotnet test src/EchoHub.slnx --no-build --configuration Release --verbosity normal
|
||||
|
||||
- name: Skip notice
|
||||
if: steps.changes.outputs.src_changed == 'false'
|
||||
run: echo "No changes in src/ — skipping build and test"
|
||||
name: PR Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
lint-markdown:
|
||||
name: Markdown Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run markdownlint
|
||||
run: bash scripts/lint-markdown.sh
|
||||
|
||||
test:
|
||||
name: Build & Test
|
||||
needs: lint-markdown
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check for src/ changes
|
||||
id: changes
|
||||
env:
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
run: |
|
||||
git fetch origin "$BASE_REF" --depth=1
|
||||
CHANGED=$(git diff --name-only "origin/$BASE_REF"...HEAD -- 'src/' | wc -l)
|
||||
if [ "$CHANGED" -gt 0 ]; then
|
||||
echo "src_changed=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "src_changed=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Setup .NET 10
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
|
||||
- name: Cache NuGet packages
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.nuget/packages
|
||||
key: nuget-${{ runner.os }}-${{ hashFiles('src/**/*.csproj') }}
|
||||
restore-keys: nuget-${{ runner.os }}-
|
||||
|
||||
- name: Restore dependencies
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
run: dotnet restore src/EchoHub.slnx
|
||||
|
||||
- name: Build
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
run: dotnet build src/EchoHub.slnx --no-restore --configuration Release
|
||||
|
||||
- name: Test
|
||||
if: steps.changes.outputs.src_changed == 'true'
|
||||
run: dotnet test src/EchoHub.slnx --no-build --configuration Release --verbosity normal
|
||||
|
||||
- name: Skip notice
|
||||
if: steps.changes.outputs.src_changed == 'false'
|
||||
run: echo "No changes in src/ — skipping build and test"
|
||||
|
||||
Reference in New Issue
Block a user