Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0c3ec6b
uograded scriban ro 7.0.0
Mar 27, 2026
2deec8d
removed sqlite 3 from infrastructure project. Added
Mar 27, 2026
aedf2bd
removed nexus entry
Mar 28, 2026
e3115cf
fixed workflows
Mar 28, 2026
8f8390f
added workflow even dispatcher
Mar 28, 2026
912914a
Merge branch 'issue-915/windows-build-test'
Mar 28, 2026
85672a1
fixed findings from latest-recommended nalysis
Mar 28, 2026
ac3d82c
fixescriban vulnerability
Mar 28, 2026
41c0454
actualiozed codeql workflow to usde node 22
Mar 28, 2026
2201c07
added workflow_dispoactch in all workflows
Mar 28, 2026
cdcf95f
change4d node.js version to 24
Mar 28, 2026
9aa33dc
using s instead now in all workflows
Mar 28, 2026
b1f0aab
extendet dependabot.yml
Mar 28, 2026
5e2a6a9
CHanged builkd -ramdisk to use uses: actions/checkout@v6
Mar 28, 2026
b46aa29
Increased checkout version to v6
Mar 28, 2026
8c4de48
Merge branch 'main' of https://github.com/MartinHock/CleanArchitecture
Mar 28, 2026
92bb6cc
merged main intp feature branch
Mar 28, 2026
80cf1d3
publish templates changed to prevent errr when no artifatcs weere pro…
Mar 28, 2026
72e24d1
Merge branch 'main' into issue-915/windows-build-test
Mar 28, 2026
7cfb20f
added nuget.cs.config
Mar 29, 2026
dcd099c
Merge branch 'main' into issue-915/windows-build-test
Mar 29, 2026
a0801a7
added nuget.ci.config to solution items
Mar 29, 2026
cdedbf3
fixed codeql-aanalysis
Mar 29, 2026
70b2863
added windows-build-yml
Mar 29, 2026
fb9a65b
feat: Add GitHub Actions for Windows and Cross-Platform builds with .…
Mar 29, 2026
dc753ab
fix: Skip Docker-dependent tests in CI pipelines
Mar 30, 2026
fe234ac
Addextened folder structure to make everything visibleed windows work…
Mar 30, 2026
02db4cb
chore: Clean up and fix GitHub Actions workflows
Mar 30, 2026
4b2a15f
chore: Change .NET 10 SDK quality from 'preview' to 'ga'
Mar 30, 2026
b907d8b
disabled redundant workflows
Mar 30, 2026
14b27a3
issue -915: added windows workflows and tests
Apr 2, 2026
4b949cb
issue-915: added windws worlflows and tests
Apr 2, 2026
c7006d7
merged meinh into feasture branch
Apr 2, 2026
b870353
Merge branch 'issue-915/windows-build-test' of https://github.com/Mar…
Apr 2, 2026
c34e239
ficed error in DIrectory.Build.Props and old reference to sdk in CLea…
Apr 3, 2026
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
7 changes: 7 additions & 0 deletions .github/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<configuration>
<packageSources>
<clear />
<!-- GitHub Actions: Use only nuget.org (no local Nexus) -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
61 changes: 56 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,58 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
# .NET NuGet dependencies - Main project
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "nuget"
commit-message:
prefix: "chore"
include: "scope"
# Security updates are automatically prioritized
versioning-strategy: increase
# Group Minor/Patch updates
groups:
production-dependencies:
patterns:
- "*"
update-types:
- "minor"
- "patch"

# Sample project dependencies
- package-ecosystem: "nuget"
directory: "/sample"
schedule:
interval: "daily"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "nuget"
- "sample"

# MinimalClean template dependencies
- package-ecosystem: "nuget"
directory: "/MinimalClean"
schedule:
interval: "daily"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "nuget"
- "minimal"

# GitHub Actions - important for Node.js 20/24 updates!
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "ci"
179 changes: 179 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# GitHub Actions Workflows

This directory contains CI/CD workflows for the Clean Architecture template.

## Workflows

### 🪟 Windows Build & Test (`windows-build-test.yml`)

**Purpose**: Windows-specific build and test pipeline for .NET 10

**Triggers**:
- Push to `main`, `develop`, or `issue-*/**` branches
- Pull requests to `main` or `develop`
- Manual workflow dispatch

**Matrix**:
- **OS**: `windows-latest`
- **Configurations**: `Debug`, `Release`

**Steps**:
1. Checkout code
2. Setup .NET 10 SDK (preview)
3. Use CI-specific NuGet.Config (nuget.org only, no Nexus)
4. Restore dependencies
5. Build solution (Debug & Release)
6. Run all tests with code coverage
7. Upload test results and coverage artifacts

**Artifacts**:
- Test results (TRX format, 30 days retention)
- Code coverage (Cobertura format, 30 days retention)

---

### 🌍 Cross-Platform Build & Test (`cross-platform-build-test.yml`)

**Purpose**: Ensure compatibility across Windows, Linux, and macOS

**Triggers**:
- Push to `main` or `develop`
- Pull requests to `main` or `develop`
- Manual workflow dispatch

**Matrix**:
- **OS**: `windows-latest`, `ubuntu-latest`, `macos-latest`
- **Configurations**: `Debug`, `Release`
- **Total jobs**: 6 (3 OS × 2 configurations)

**Steps**:
1. Checkout code
2. Setup .NET 10 SDK (preview)
3. Restore dependencies
4. Build solution
5. Run tests with coverage
6. Upload artifacts

---

## Local Development vs CI/CD

### NuGet Configuration

**Local Development** (`NuGet.Config` in root):
```xml
<packageSources>
<add key="nexus" value="http://localhost:8081/repository/nuget-group/index.json" allowInsecureConnections="true" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
```

**CI/CD** (`.github/NuGet.Config`):
```xml
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
```

The workflows automatically copy `.github/NuGet.Config` to the root during the build process.

---

## .NET 10 SDK

All workflows use:
```yaml
- name: Setup .NET 10 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
dotnet-quality: 'preview'
```

**Note**: .NET 10 is in preview. Update `dotnet-quality` to `ga` when it reaches General Availability.

---

## Running Workflows Manually

### Via GitHub UI
1. Go to **Actions** tab
2. Select workflow (e.g., "Windows Build & Test")
3. Click **Run workflow**
4. Select branch
5. Click **Run workflow** button

### Via GitHub CLI
```bash
# Windows Build & Test
gh workflow run windows-build-test.yml --ref issue-915/windows-build-test

# Cross-Platform Build & Test
gh workflow run cross-platform-build-test.yml --ref main
```

---

## Viewing Results

### Build Status Badges

Add to your README.md:

```markdown
![Windows Build](https://github.com/MartinHock/CleanArchitecture/actions/workflows/windows-build-test.yml/badge.svg)
![Cross-Platform Build](https://github.com/MartinHock/CleanArchitecture/actions/workflows/cross-platform-build-test.yml/badge.svg)
```

### Artifacts

Test results and code coverage are available as downloadable artifacts for 30 days:
- **Artifacts tab** in each workflow run
- Named: `test-results-{os}-{configuration}` and `coverage-{os}-{configuration}`

---

## Troubleshooting

### Restore Fails with HTTP Error

The workflows use only `nuget.org`. If restore fails:
1. Check if .NET 10 SDK packages are available
2. Verify no local `NuGet.Config` overrides CI config
3. Check GitHub Actions logs for detailed errors

### Test Failures

1. Check **Test Results** artifact (TRX file)
2. Review **Code Coverage** artifact
3. Run locally: `dotnet test --configuration Debug --logger "trx"`

### Build Fails on Specific OS

The cross-platform workflow uses `fail-fast: false`, so builds continue even if one OS fails.
Check individual job logs to identify OS-specific issues.

---

## Best Practices

✅ **Do**:
- Run workflows on feature branches before merging
- Review test results and coverage artifacts
- Fix failing tests promptly
- Keep workflows updated with latest GitHub Actions versions

❌ **Don't**:
- Commit local `NuGet.Config` with Nexus configuration
- Skip tests to make builds "pass"
- Ignore warnings in build output
- Use outdated SDK versions

---

## Related Documentation

- [GitHub Actions Docs](https://docs.github.com/en/actions)
- [.NET 10 Preview](https://dotnet.microsoft.com/download/dotnet/10.0)
- [Clean Architecture Template](../../README.md)
- [Copilot Instructions](../copilot-instructions.md)
33 changes: 14 additions & 19 deletions .github/workflows/build-ramdisk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,37 @@ name: Build and Test with Ramdisk
on:
push:
branches:
- main
- '**'
workflow_dispatch:
pull_request:

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v6

# Step 2: Set up .NET environment
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
dotnet-version: '10.0.x'
dotnet-quality: 'ga'

- name: Setup CI NuGet Config
run: cp .github/NuGet.Config NuGet.Config

# Step 3: Prepare a directory in /dev/shm
- name: Set up Ramdisk Directory
run: |
mkdir -p /dev/shm/ramdisk/project
run: mkdir -p /dev/shm/ramdisk/project

# Step 4: Copy source code to the ramdisk
- name: Copy Code to Ramdisk
run: |
cp -r $GITHUB_WORKSPACE/* /dev/shm/ramdisk/project

# Step 5: Debug Directory Contents
- name: Debug Directory
run: |
ls -R /dev/shm/ramdisk/project
run: cp -a "$GITHUB_WORKSPACE"/. /dev/shm/ramdisk/project/

# Step 6: Build and Test from the ramdisk
- name: Build and Test
run: |
cd /dev/shm/ramdisk/project
dotnet build Clean.Architecture.slnx --configuration Debug
dotnet test Clean.Architecture.slnx --
cp .github/NuGet.Config NuGet.Config
dotnet restore Clean.Architecture.slnx
dotnet build Clean.Architecture.slnx --configuration Debug --no-restore
dotnet test Clean.Architecture.slnx --configuration Debug --no-build --verbosity normal --filter "FullyQualifiedName!~DockerAvailabilityTests"
45 changes: 29 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,45 @@
name: CodeQL Analysis
name: CodeQL

on:
push:
branches: [ main ]
branches:
- '**'
pull_request:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
- cron: '0 3 * * 1'

jobs:
analyze:
name: CodeQL Analysis
name: Analyze C#
runs-on: ubuntu-latest

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

steps:
- name: Checkout repository
id: checkout_repo
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v5

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

- name: Initialize CodeQL
id: init_codeql
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
queries: security-and-quality
languages: csharp
build-mode: manual

- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Restore
run: dotnet restore ./Clean.Architecture.slnx --configfile .github/workflows/nuget.ci.config

- name: Perform CodeQL Analysis
id: analyze_codeql
uses: github/codeql-action/analyze@v3
- name: Build
run: dotnet build ./Clean.Architecture.slnx --configuration Release --no-restore

# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)
- name: Analyze
uses: github/codeql-action/analyze@v4
Loading