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
3 changes: 3 additions & 0 deletions .aspire/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"appHostPath": "..\\src\\Werkr.AppHost\\Werkr.AppHost.csproj"
}
790 changes: 395 additions & 395 deletions .editorconfig

Large diffs are not rendered by default.

151 changes: 46 additions & 105 deletions .github/workflows/DocFX_gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,116 +3,57 @@ on:
push:
branches:
- main
paths:
- 'docs/**'
- 'src/**/*.csproj'
- '.github/workflows/DocFX_gh-pages.yml'

permissions:
contents: write

jobs:
document:
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
DOCFX_SOURCE_BRANCH_NAME: ${{ github.ref }}
strategy:
matrix:
dotnet-version: [ '7.0.x' ]
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Check out Werkr.Common
uses: actions/checkout@v2
with:
repository: DarkgreyDevelopment/Werkr.Common
path: src/Werkr.Common
token: ${{ secrets.CI_TOKEN }}
- name: Check out Werkr.Common.Configuration
uses: actions/checkout@v2
with:
repository: DarkgreyDevelopment/Werkr.Common.Configuration
path: src/Werkr.Common.Configuration
token: ${{ secrets.CI_TOKEN }}
- name: Check out Werkr.Installers
uses: actions/checkout@v2
with:
repository: DarkgreyDevelopment/Werkr.Installers
path: src/Werkr.Installers
token: ${{ secrets.CI_TOKEN }}
- name: Check out Werkr.Server
uses: actions/checkout@v2
with:
repository: DarkgreyDevelopment/Werkr.Server
path: src/Werkr.Server
token: ${{ secrets.CI_TOKEN }}
- name: Check out Werkr.Agent
uses: actions/checkout@v2
with:
repository: DarkgreyDevelopment/Werkr.Agent
path: src/Werkr.Agent
token: ${{ secrets.CI_TOKEN }}
- name: Get DocFX
shell: pwsh
run: |
$IWRParams = @{
Uri = "https://github.com/dotnet/docfx/releases/download/v2.59.4/docfx.zip"
OutFile = '${{ github.workspace }}/docfx.zip'
Method = 'Get'
}
Invoke-WebRequest @IWRParams
Expand-Archive -Path '${{ github.workspace }}/docfx.zip' -DestinationPath '${{ github.workspace }}/docfx'
- name: Custom File processing.
shell: pwsh
run: |
$DocsPath = '${{ github.workspace }}/docs'
$CopyParams = @{
Verbose = $true
Force = $true
}
copy-item -Path '${{ github.workspace }}/LICENSE' -Destination "$DocsPath/LICENSE.md" @CopyParams
copy-item -Path '${{ github.workspace }}/README.md' -Destination "$DocsPath/index.md" @CopyParams
copy-Item -Path '${{ github.workspace }}/docs/docfx/*' -Destination $DocsPath -Exclude README.md -Verbose -Recurse
- name: Generate Documentation and build site.
shell: pwsh
run: |
Write-Host "`nGenerating API documentation:"
& '${{ github.workspace }}/docfx/docfx.exe' metadata '${{ github.workspace }}/docs/docfx.json'
Write-Host "`nCreating docfx site:"
& '${{ github.workspace }}/docfx/docfx.exe' '${{ github.workspace }}/docs/docfx.json'
- name: Compress Site for upload as Artifact.
shell: pwsh
run: |
$CopyToSiteParams = @{
Destination = '${{ github.workspace }}/docs/_site'
Verbose = $true
}
copy-item -Path '${{ github.workspace }}/docs/CNAME' @CopyToSiteParams
copy-item -Path '${{ github.workspace }}/docs/_config.yml' @CopyToSiteParams
Write-Host "`nCompressing Site for Artifact Upload"
Compress-Archive -Path '${{ github.workspace }}/docs/_site' -DestinationPath '${{ github.workspace }}/docs/_site.zip'
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: site
path: ${{ github.workspace }}/docs/_site.zip
publish:
needs: document
build-and-publish:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOCFX_SOURCE_BRANCH_NAME: ${{ github.ref }}
strategy:
matrix:
dotnet-version: [ '7.0.x' ]
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v1
with:
name: site
path: ${{ github.workspace }}/download
- name: Verify WorkSpace Contents
shell: pwsh
- name: Check out repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

- name: Install DocFX
run: dotnet tool install -g docfx --version 2.78.3

- name: Prepare documentation sources
run: |
cp LICENSE docs/LICENSE.md
cp README.md docs/index.md
cp -r docs/docfx/* docs/ 2>/dev/null || true

- name: Generate API metadata
run: docfx metadata docs/docfx.json

- name: Build documentation site
run: docfx docs/docfx.json

- name: Copy CNAME and config
run: |
Write-Host "`Extracting Site."
Expand-Archive -Path '${{ github.workspace }}/download/_site.zip' -DestinationPath '${{ github.workspace }}'
- name: Publish Site Content
cp docs/CNAME docs/_site/ 2>/dev/null || true
cp docs/_config.yml docs/_site/ 2>/dev/null || true

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: docfx-site
path: docs/_site

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages
FOLDER: ${{ github.workspace }}/_site
branch: gh-pages
folder: docs/_site
177 changes: 98 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,98 @@
name: CI

on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Restore tools
run: dotnet tool restore

- name: Determine version
id: version
run: |
VERSION_JSON=$(dotnet gitversion /output json)
echo "semVer=$(echo $VERSION_JSON | jq -r '.SemVer')" >> $GITHUB_OUTPUT
echo "assemblySemVer=$(echo $VERSION_JSON | jq -r '.AssemblySemVer')" >> $GITHUB_OUTPUT
echo "assemblySemFileVer=$(echo $VERSION_JSON | jq -r '.AssemblySemFileVer')" >> $GITHUB_OUTPUT
echo "informationalVersion=$(echo $VERSION_JSON | jq -r '.InformationalVersion')" >> $GITHUB_OUTPUT

- name: Restore dependencies
run: |
# Backup lock files before restore
find . -name "packages.lock.json" -exec cp {} {}.backup \;

# Restore with force-evaluate for linux-x64
dotnet restore Werkr.slnx --force-evaluate

# Validate lock file changes (skip Windows-only Installer projects)
for lockfile in $(find . -name "packages.lock.json" ! -name "*.backup" ! -path "*/Installer/*"); do
backup="${lockfile}.backup"
if [ -f "$backup" ]; then
pwsh scripts/Test-LockFileChanges.ps1 -BackupPath "$backup" -CurrentPath "$lockfile" -ToPlatform "linux-x64"
rm -f "$backup"
fi
done

- name: Build
run: >
dotnet build Werkr.slnx -c Release --no-restore
/p:Version=${{ steps.version.outputs.semVer }}
/p:AssemblyVersion=${{ steps.version.outputs.assemblySemVer }}
/p:FileVersion=${{ steps.version.outputs.assemblySemFileVer }}
/p:InformationalVersion="${{ steps.version.outputs.informationalVersion }}"

- name: Test
run: >
dotnet test --solution Werkr.slnx -c Release --no-build
--logger "trx;LogFileName=results.trx"
--results-directory TestResults

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: TestResults/**/*.trx
name: CI

on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Restore tools
run: dotnet tool restore

- name: Determine version
id: version
run: |
VERSION_JSON=$(dotnet gitversion /output json)
echo "semVer=$(echo $VERSION_JSON | jq -r '.SemVer')" >> $GITHUB_OUTPUT
echo "assemblySemVer=$(echo $VERSION_JSON | jq -r '.AssemblySemVer')" >> $GITHUB_OUTPUT
echo "assemblySemFileVer=$(echo $VERSION_JSON | jq -r '.AssemblySemFileVer')" >> $GITHUB_OUTPUT
echo "informationalVersion=$(echo $VERSION_JSON | jq -r '.InformationalVersion')" >> $GITHUB_OUTPUT

- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: src/Werkr.Server/graph-ui/package-lock.json

- name: Install graph-ui dependencies
run: npm ci --prefix src/Werkr.Server/graph-ui

- name: Run JS tests
run: npm test --prefix src/Werkr.Server/graph-ui

- name: Build JS bundles (production)
run: npm run build:prod --prefix src/Werkr.Server/graph-ui

- name: Check bundle sizes
run: node src/Werkr.Server/graph-ui/scripts/check-bundle-size.mjs

- name: Restore dependencies
run: |
# Backup lock files before restore
find . -name "packages.lock.json" -exec cp {} {}.backup \;

# Restore with force-evaluate for linux-x64
dotnet restore Werkr.slnx --force-evaluate

# Validate lock file changes (skip Windows-only Installer projects)
for lockfile in $(find . -name "packages.lock.json" ! -name "*.backup" ! -path "*/Installer/*"); do
backup="${lockfile}.backup"
if [ -f "$backup" ]; then
pwsh scripts/Test-LockFileChanges.ps1 -BackupPath "$backup" -CurrentPath "$lockfile" -ToPlatform "linux-x64"
rm -f "$backup"
fi
done

- name: Build
run: >
dotnet build Werkr.slnx -c Release --no-restore
/p:Version=${{ steps.version.outputs.semVer }}
/p:AssemblyVersion=${{ steps.version.outputs.assemblySemVer }}
/p:FileVersion=${{ steps.version.outputs.assemblySemFileVer }}
/p:InformationalVersion="${{ steps.version.outputs.informationalVersion }}"

- name: Test
run: >
dotnet test --solution Werkr.slnx -c Release --no-build
--logger "trx;LogFileName=results.trx"
--results-directory TestResults

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: TestResults/**/*.trx
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ docs/projects/*

# Visual Studio Code Configuration
.vscode/*
!.vscode/tasks.json

# Visual Studio Configuration
.vs/*
Expand All @@ -78,6 +79,10 @@ docs/projects/*

# SQLite Database Files
*.db

# Node / TypeScript build artifacts
node_modules/
**/wwwroot/js/dist/
*.db-shm
*.db-wal

Expand All @@ -94,6 +99,9 @@ docker-compose.override.yml
# Aspire publish output
aspire-output/

# User-specific project files
*.user

# Secrets directory
secrets/

Expand Down Expand Up @@ -132,4 +140,4 @@ logs/

*.dll
*.exe
*.pdb
*.pdb
Loading