Skip to content

Commit b030786

Browse files
committed
Add CI/CD. Thank you Copilot!
1 parent a2ef6b6 commit b030786

File tree

15 files changed

+1143
-2
lines changed

15 files changed

+1143
-2
lines changed
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
name: 🐛 Bug Report
2+
description: Report a bug in Aspekt
3+
title: "[BUG]: "
4+
labels: ["bug", "triage"]
5+
assignees:
6+
- mvpete
7+
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to report a bug! 🙏
13+
Please fill out this form as completely as possible.
14+
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: Bug Description
19+
description: A clear and concise description of what the bug is.
20+
placeholder: Describe the bug...
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: reproduction
26+
attributes:
27+
label: Steps to Reproduce
28+
description: |
29+
Steps to reproduce the behavior:
30+
1. Go to '...'
31+
2. Click on '....'
32+
3. Scroll down to '....'
33+
4. See error
34+
placeholder: |
35+
1.
36+
2.
37+
3.
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: expected
43+
attributes:
44+
label: Expected Behavior
45+
description: A clear and concise description of what you expected to happen.
46+
placeholder: What should have happened?
47+
validations:
48+
required: true
49+
50+
- type: textarea
51+
id: actual
52+
attributes:
53+
label: Actual Behavior
54+
description: A clear and concise description of what actually happened.
55+
placeholder: What actually happened?
56+
validations:
57+
required: true
58+
59+
- type: textarea
60+
id: code
61+
attributes:
62+
label: Code Sample
63+
description: |
64+
Please provide a minimal code sample that reproduces the issue.
65+
If the code is long, consider creating a minimal reproduction project.
66+
render: csharp
67+
placeholder: |
68+
// Your code here
69+
public class Example
70+
{
71+
[YourAspect]
72+
public void Method() { }
73+
}
74+
75+
- type: dropdown
76+
id: version
77+
attributes:
78+
label: Aspekt Version
79+
description: What version of Aspekt are you using?
80+
options:
81+
- 2.0.0 (latest)
82+
- 1.x.x (legacy)
83+
- Other (please specify in additional context)
84+
validations:
85+
required: true
86+
87+
- type: dropdown
88+
id: dotnet-version
89+
attributes:
90+
label: .NET Version
91+
description: What version of .NET are you using?
92+
options:
93+
- .NET 9.0
94+
- .NET 8.0
95+
- .NET 6.0
96+
- .NET Framework 4.8
97+
- .NET Framework 4.7.2
98+
- Other (please specify in additional context)
99+
validations:
100+
required: true
101+
102+
- type: dropdown
103+
id: os
104+
attributes:
105+
label: Operating System
106+
description: What operating system are you using?
107+
options:
108+
- Windows 11
109+
- Windows 10
110+
- Windows Server 2022
111+
- Windows Server 2019
112+
- macOS
113+
- Linux
114+
- Other (please specify in additional context)
115+
validations:
116+
required: true
117+
118+
- type: dropdown
119+
id: ide
120+
attributes:
121+
label: Development Environment
122+
description: What development environment are you using?
123+
options:
124+
- Visual Studio 2022
125+
- Visual Studio 2019
126+
- Visual Studio Code
127+
- JetBrains Rider
128+
- Command Line
129+
- Other (please specify in additional context)
130+
validations:
131+
required: true
132+
133+
- type: textarea
134+
id: error-message
135+
attributes:
136+
label: Error Message/Stack Trace
137+
description: |
138+
If applicable, please provide the full error message and stack trace.
139+
render: text
140+
placeholder: |
141+
System.Exception: Error message here
142+
at Namespace.Class.Method() in File.cs:line 123
143+
144+
- type: textarea
145+
id: build-output
146+
attributes:
147+
label: Build Output
148+
description: |
149+
If applicable, please provide relevant build output, especially from the Aspekt weaving process.
150+
render: text
151+
placeholder: |
152+
MSBuild output here...
153+
154+
- type: textarea
155+
id: additional-context
156+
attributes:
157+
label: Additional Context
158+
description: |
159+
Add any other context about the problem here.
160+
- Screenshots
161+
- Related issues
162+
- Workarounds you've tried
163+
- Any other relevant information
164+
placeholder: Any additional information that might help...
165+
166+
- type: checkboxes
167+
id: checklist
168+
attributes:
169+
label: Checklist
170+
description: Please confirm the following:
171+
options:
172+
- label: I have searched existing issues to ensure this bug hasn't been reported before
173+
required: true
174+
- label: I have provided a minimal code sample that reproduces the issue
175+
required: true
176+
- label: I have included the complete error message/stack trace (if applicable)
177+
required: false
178+
- label: I am willing to help test a fix for this issue
179+
required: false
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: ✨ Feature Request
2+
description: Suggest a new feature or enhancement for Aspekt
3+
title: "[FEATURE]: "
4+
labels: ["enhancement", "triage"]
5+
assignees:
6+
- mvpete
7+
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for suggesting a new feature! 🚀
13+
Please provide as much detail as possible to help us understand your request.
14+
15+
- type: textarea
16+
id: summary
17+
attributes:
18+
label: Feature Summary
19+
description: A brief, clear summary of the feature you'd like to see added.
20+
placeholder: Briefly describe the feature...
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: motivation
26+
attributes:
27+
label: Motivation
28+
description: |
29+
Why do you want this feature? What problem does it solve?
30+
What use cases does it enable?
31+
placeholder: |
32+
I would like this feature because...
33+
It would solve the problem of...
34+
This would enable...
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: detailed-description
40+
attributes:
41+
label: Detailed Description
42+
description: |
43+
Provide a detailed description of the feature.
44+
How should it work? What should the API look like?
45+
placeholder: |
46+
The feature should work by...
47+
The API could look like...
48+
Users would interact with it by...
49+
validations:
50+
required: true
51+
52+
- type: textarea
53+
id: proposed-api
54+
attributes:
55+
label: Proposed API/Usage
56+
description: |
57+
If you have ideas about how the feature should be used, provide code examples.
58+
render: csharp
59+
placeholder: |
60+
// Example of how the feature might be used
61+
[YourNewFeature(parameter: "value")]
62+
public void MyMethod()
63+
{
64+
// Method implementation
65+
}
66+
67+
- type: dropdown
68+
id: category
69+
attributes:
70+
label: Feature Category
71+
description: Which area of Aspekt does this feature relate to?
72+
options:
73+
- Core AOP functionality
74+
- Contracts (Design by Contract)
75+
- Logging aspects
76+
- Performance/Diagnostics
77+
- Build integration
78+
- Documentation
79+
- Developer experience
80+
- Testing
81+
- Other (please specify in additional context)
82+
validations:
83+
required: true
84+
85+
- type: dropdown
86+
id: priority
87+
attributes:
88+
label: Priority
89+
description: How important is this feature to you?
90+
options:
91+
- High - Critical for my project
92+
- Medium - Would be very helpful
93+
- Low - Nice to have
94+
validations:
95+
required: true
96+
97+
- type: textarea
98+
id: alternatives
99+
attributes:
100+
label: Alternatives Considered
101+
description: |
102+
Have you considered any alternative solutions or workarounds?
103+
How are you currently handling this use case?
104+
placeholder: |
105+
I've considered...
106+
Currently I'm working around this by...
107+
Other libraries handle this by...
108+
109+
- type: textarea
110+
id: related-features
111+
attributes:
112+
label: Related Features
113+
description: |
114+
Are there any existing Aspekt features that this relates to?
115+
Would this feature work well with other planned features?
116+
placeholder: |
117+
This relates to...
118+
It would work well with...
119+
It might conflict with...
120+
121+
- type: textarea
122+
id: breaking-changes
123+
attributes:
124+
label: Breaking Changes
125+
description: |
126+
Would this feature require any breaking changes to existing APIs?
127+
How could breaking changes be minimized?
128+
placeholder: |
129+
This feature would/would not require breaking changes because...
130+
Breaking changes could be minimized by...
131+
132+
- type: textarea
133+
id: additional-context
134+
attributes:
135+
label: Additional Context
136+
description: |
137+
Add any other context, screenshots, or examples that help explain the feature request.
138+
placeholder: |
139+
Additional information:
140+
- Links to similar features in other libraries
141+
- Screenshots or mockups
142+
- Performance considerations
143+
- Any other relevant information
144+
145+
- type: checkboxes
146+
id: checklist
147+
attributes:
148+
label: Checklist
149+
description: Please confirm the following:
150+
options:
151+
- label: I have searched existing issues to ensure this feature hasn't been requested before
152+
required: true
153+
- label: I have provided a clear use case for this feature
154+
required: true
155+
- label: I have considered how this feature fits with Aspekt's existing design
156+
required: true
157+
- label: I am willing to help test this feature when implemented
158+
required: false
159+
- label: I am willing to contribute to the implementation of this feature
160+
required: false

.github/PIPELINE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 🚀 CI/CD Pipeline Documentation\n\nThis document describes the complete CI/CD pipeline setup for the Aspekt project, including build automation, testing, and package publishing.\n\n## 📋 Pipeline Overview\n\nThe Aspekt project uses GitHub Actions for continuous integration and deployment with the following workflows:\n\n### 🔧 Main CI/CD Workflow (`ci.yml`)\n\n**Triggered by:**\n- Push to `master`, `main`, or `develop` branches\n- Pull requests to `master` or `main`\n- Release publications\n\n**Jobs:**\n\n1. **Build & Test** - Multi-version testing across .NET 6.0, 8.0, and 9.0\n2. **Code Quality Analysis** - Code formatting and static analysis\n3. **Security Scan** - Vulnerability assessment\n4. **Publish to NuGet** - Release packages to NuGet.org (on releases)\n5. **Publish Pre-release** - Alpha packages to GitHub Packages (on master commits)\n\n### 📖 Documentation Workflow (`docs.yml`)\n\n**Triggered by:**\n- Changes to documentation files\n- Push to main branches\n\n**Features:**\n- Markdown link validation\n- Spell checking\n- Documentation structure validation\n- Automatic table of contents updates\n\n### 🏷️ Release Workflow (`release.yml`)\n\n**Triggered by:**\n- Git tags matching `v*.*.*` pattern\n\n**Creates:**\n- GitHub Releases with automated release notes\n- Attached NuGet packages\n- Pre-release detection for alpha/beta tags\n\n### 🤖 Dependabot Auto-merge (`dependabot-auto-merge.yml`)\n\n**Triggered by:**\n- Dependabot pull requests\n\n**Features:**\n- Automated testing of dependency updates\n- Auto-merge for passing dependency PRs\n\n## 🔑 Required Secrets\n\nThe following secrets must be configured in your GitHub repository:\n\n### Required Secrets\n\n| Secret Name | Description | Required For |\n|-------------|-------------|-------------|\n| `NUGET_API_KEY` | NuGet.org API key for package publishing | NuGet releases |\n| `GITHUB_TOKEN` | Automatically provided by GitHub | GitHub Packages, releases |\n\n### Setting Up Secrets\n\n1. **NuGet API Key:**\n ```bash\n # Go to https://www.nuget.org/account/apikeys\n # Create a new API key with \"Push new packages and package versions\" scope\n # Add to GitHub Secrets as NUGET_API_KEY\n ```\n\n2. **GitHub Token:**\n - Automatically provided by GitHub Actions\n - No manual setup required\n\n## 📦 Package Publishing\n\n### Release Process\n\n1. **Create a Release Tag:**\n ```bash\n git tag v2.0.1\n git push origin v2.0.1\n ```\n\n2. **GitHub Actions will:**\n - Build and test all projects\n - Create NuGet packages\n - Run security scans\n - Publish to NuGet.org\n - Publish to GitHub Packages\n - Create GitHub Release with notes\n\n### Pre-release Process\n\nPush to `master` branch automatically:\n- Creates alpha packages with timestamp and commit SHA\n- Publishes to GitHub Packages only\n- Format: `2.0.0-alpha.20241026143022.abc1234.nupkg`\n\n### Manual Package Creation\n\n```bash\n# Build packages locally\ndotnet pack Aspekt/Aspekt.csproj --configuration Release --output nupkgs\ndotnet pack Aspekt.Contracts/Aspekt.Contracts.csproj --configuration Release --output nupkgs\ndotnet pack Aspekt.Logging/Aspekt.Logging.csproj --configuration Release --output nupkgs\n\n# Publish manually (if needed)\ndotnet nuget push \"nupkgs/*.nupkg\" --api-key YOUR_API_KEY --source https://api.nuget.org/v3/index.json\n```\n\n## 🛡️ Security & Quality\n\n### Code Analysis\n\n- **Roslyn Analyzers**: Enabled with `AllEnabledByDefault` mode\n- **StyleCop**: Code style enforcement\n- **Security Analysis**: Vulnerability scanning for dependencies\n- **Code Formatting**: Automatic verification with `dotnet format`\n\n### Dependency Management\n\n- **Dependabot**: Weekly automatic dependency updates\n- **Auto-merge**: Passing dependency updates are automatically merged\n- **Security Alerts**: Automated vulnerability detection\n\n## 🔄 Workflow Details\n\n### Build Matrix\n\n```yaml\nstrategy:\n matrix:\n dotnet-version: ['6.0.x', '8.0.x', '9.0.x']\n```\n\n- Tests run against all supported .NET versions\n- Only .NET 8.0 creates and uploads packages (single artifact)\n- Ensures compatibility across all target frameworks\n\n### Test Execution\n\n```yaml\n# Individual project testing for clear results\ndotnet test Aspekt.Test/Aspekt.Test.csproj\ndotnet test Aspekt.Bootstrap.Test/Aspekt.Bootstrap.Test.csproj\ndotnet test Aspekt.Foundation.Test/Aspekt.Foundation.Test.csproj\ndotnet test Aspekt.Logging.Test/Aspekt.Logging.Test.csproj\n```\n\n### Caching Strategy\n\n- **NuGet Packages**: Cached based on project files and lock files\n- **Build Artifacts**: Temporary caching for workflow efficiency\n- **Test Results**: Uploaded for all matrix combinations\n\n## 🎯 Package Information\n\n### Published Packages\n\n1. **Aspekt** - Core AOP functionality\n - Target Frameworks: `net9.0;net8.0;net6.0;netstandard2.1`\n - Dependencies: Minimal, self-contained\n\n2. **Aspekt.Contracts** - Design by Contract\n - Target Frameworks: `net9.0;net8.0;net6.0;netstandard2.1`\n - Dependencies: Aspekt (core)\n\n3. **Aspekt.Logging** - Logging Aspects\n - Target Frameworks: `net9.0;net8.0;net6.0;netstandard2.1`\n - Dependencies: Aspekt (core), Microsoft.Extensions.Logging\n\n### Package Metadata\n\n```xml\n<PropertyGroup>\n <Authors>mvpete</Authors>\n <Copyright>Peter Lorimer © 2025</Copyright>\n <PackageLicenseExpression>MIT</PackageLicenseExpression>\n <RepositoryUrl>https://github.com/mvpete/aspekt</RepositoryUrl>\n <PackageTags>AOP;Aspect Oriented Programming</PackageTags>\n</PropertyGroup>\n```\n\n## 🚨 Troubleshooting\n\n### Common Issues\n\n**Build Failures:**\n```bash\n# Check workflow logs\n# Verify .NET SDK versions\n# Check for breaking changes in dependencies\n```\n\n**Test Failures:**\n```bash\n# Download test artifacts from failed runs\n# Check for timing issues in parallel tests\n# Verify static state cleanup between tests\n```\n\n**Publish Failures:**\n```bash\n# Verify API keys are current\n# Check package version conflicts\n# Ensure all required metadata is present\n```\n\n### Debug Commands\n\n```bash\n# Local build simulation\ndotnet restore Aspekt.sln\ndotnet build Aspekt.sln --configuration Release\ndotnet test --configuration Release --verbosity normal\n\n# Package creation\ndotnet pack --configuration Release --output nupkgs\n\n# Format checking\ndotnet format Aspekt.sln --verify-no-changes\n```\n\n## 📈 Monitoring\n\n### Workflow Status\n\n- **Build Status**: Visible in repository badges\n- **Test Results**: Uploaded as artifacts for each run\n- **Package Downloads**: Tracked via NuGet.org analytics\n- **Security Alerts**: GitHub Advanced Security (if enabled)\n\n### Metrics\n\n- **Build Time**: Typically 3-5 minutes for full matrix\n- **Test Coverage**: Tracked per project\n- **Package Size**: Monitored for bloat\n- **Dependency Updates**: Weekly automatic checks\n\n## 🔮 Future Enhancements\n\n### Planned Improvements\n\n- [ ] Integration testing with real applications\n- [ ] Performance benchmarking\n- [ ] Multi-platform testing (Linux, macOS)\n- [ ] Code coverage reporting\n- [ ] Automated changelog generation\n- [ ] Canary releases for early adopters\n\n### Advanced Features\n\n- [ ] Multi-stage deployments\n- [ ] Blue/green deployment strategy\n- [ ] Package signing with certificates\n- [ ] Automated rollback on critical issues\n- [ ] Integration with package vulnerability databases\n\n---\n\n## 📞 Support\n\nFor issues with the CI/CD pipeline:\n\n1. Check the [Troubleshooting Guide](../docs/TROUBLESHOOTING.md)\n2. Review workflow logs in GitHub Actions\n3. Create an issue using the bug report template\n4. Contact maintainers via GitHub discussions\n\n**Pipeline maintained by:** [@mvpete](https://github.com/mvpete)\n\n**Last updated:** October 2025

0 commit comments

Comments
 (0)