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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ updates:
patterns:
- "Aspire.*"

- package-ecosystem: "npm"
directory: "/Documentations"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "documentation"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on:
push:
branches: ['**']
pull_request:
branches: [main]

permissions:
contents: read

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
DOTNET_VERSION: '10.0.x'
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'

jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/*.slnx') }}
restore-keys: nuget-${{ runner.os }}-

- name: Restore dependencies
run: dotnet restore CaeriusNet.slnx

- name: Build (Release)
run: |
dotnet build CaeriusNet.slnx \
--configuration Release \
--no-restore \
-p:TreatWarningsAsErrors=true \

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This passes WarningLevel=9999 into MSBuild/CSC, which can break the CI build for the same reason as in the project files (invalid /warn level). Change this to -p:WarningLevel=4 (or remove the property override entirely if the csproj already enforces the desired setting).

Suggested change
-p:TreatWarningsAsErrors=true \
-p:WarningLevel=4

Copilot uses AI. Check for mistakes.
-p:WarningLevel=4

- name: Run tests with coverage
run: |
dotnet test CaeriusNet.slnx \
--configuration Release \
--no-restore \
--no-build \
--collect:"XPlat Code Coverage" \
--results-directory ./coverage \
--logger "trx;LogFileName=test-results.trx" \
--logger "console;verbosity=normal" \
-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura

- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-reports
path: ./coverage/**/coverage.cobertura.xml
retention-days: 14

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: ./coverage/**/*.trx
retention-days: 14

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: success() && secrets.CODECOV_TOKEN != ''
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/**/coverage.cobertura.xml
flags: unittests
name: caeriusnet-coverage
Comment on lines +77 to +85

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On pull requests from forks, repository secrets are unavailable, which can cause the Codecov step to error/no-op depending on action behavior. To make CI outcomes consistent, consider gating this step on the presence of the secret (or omit token when not required for public repos) so fork PRs don’t produce confusing failures/noisy logs.

Copilot uses AI. Check for mistakes.
fail_ci_if_error: false
63 changes: 63 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CodeQL Security Analysis

on:
push:
branches: [main, 'feature/**']
pull_request:
branches: [main]
schedule:
- cron: '0 3 * * 1' # Monday 03:00 UTC

permissions:
actions: read
contents: read
security-events: write

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'

jobs:
analyze:
name: CodeQL Analysis β€” C#
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [csharp]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended
config: |
paths-ignore:
- Benchmark/**
- Exemples/**
- Documentations/**

- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Restore dependencies
run: dotnet restore CaeriusNet.slnx

- name: Build for CodeQL
run: |
dotnet build CaeriusNet.slnx \
--configuration Release \
--no-restore

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
upload: true
6 changes: 6 additions & 0 deletions .github/workflows/github-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ concurrency:
group: pages
cancel-in-progress: false

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'

jobs:
# Build job
build:
Expand All @@ -50,6 +53,9 @@ jobs:
- name: Install dependencies
working-directory: Documentations
run: npm ci # or pnpm install / yarn install / bun install
- name: Audit npm dependencies
working-directory: Documentations
run: npm audit --audit-level=high
- name: Build with VitePress
working-directory: Documentations
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
Expand Down
72 changes: 65 additions & 7 deletions .github/workflows/nuget-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'

jobs:
bump-version:
Expand Down Expand Up @@ -59,11 +60,48 @@ jobs:
git commit -m "chore: bump version to ${{ steps.bump.outputs.new_version }} [skip ci]"
git push

build:
name: Build and Pack
test:
name: Test & Validate
runs-on: ubuntu-latest
needs: [bump-version]
if: always() && (needs.bump-version.result == 'success' || needs.bump-version.result == 'skipped')
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/*.slnx') }}
restore-keys: nuget-${{ runner.os }}-

- name: Restore Dependencies
run: dotnet restore CaeriusNet.slnx

- name: Build
run: dotnet build CaeriusNet.slnx --configuration Release --no-restore

- name: Run Tests
run: |
dotnet test CaeriusNet.slnx \
--configuration Release \
--no-restore \
--no-build \
--collect:"XPlat Code Coverage" \
--results-directory ./coverage \
--logger "console;verbosity=normal"

build:
name: Build and Pack
runs-on: ubuntu-latest
needs: [test]
if: always() && needs.test.result == 'success'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -73,17 +111,29 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
10.0.x
dotnet-version: '10.0.x'

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/*.slnx') }}
restore-keys: nuget-${{ runner.os }}-

- name: Restore Dependencies
run: dotnet restore Src/CaeriusNet.csproj

- name: Build CaeriusNet
run: dotnet build Src/CaeriusNet.csproj --configuration Release --no-restore

- name: Pack CaeriusNet
run: dotnet pack Src/CaeriusNet.csproj --configuration Release --no-build --output ./packages
- name: Pack CaeriusNet (nupkg + snupkg)
run: >
dotnet pack Src/CaeriusNet.csproj
--configuration Release
--no-build
--output ./packages
-p:IncludeSymbols=true
-p:SymbolPackageFormat=snupkg

- name: Upload Package Artifacts
uses: actions/upload-artifact@v4
Expand All @@ -105,4 +155,12 @@ jobs:
path: ./packages

- name: Publish CaeriusNet to NuGet
run: dotnet nuget push ./packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
run: |
dotnet nuget push ./packages/*.nupkg \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate
dotnet nuget push ./packages/*.snupkg \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate || true
Loading
Loading