Skip to content

Commit f5fea18

Browse files
CopilotJerrettDavisCopilot
authored
ci: Add GitHub workflows and repository templates (#33)
* Initial plan * Add GitHub workflows and templates: dependency-review, labeler, stale, update-packages, CODEOWNERS, PR template, dependabot, and quick reference Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com> * Improve update-packages.yml to handle cases when no packages are outdated Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com> * Update .github/workflows/update-packages.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/QUICK_REFERENCE.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/workflows/update-packages.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/workflows/update-packages.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JerrettDavis <2610199+JerrettDavis@users.noreply.github.com> Co-authored-by: JD Davis <mxjerrett@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7944db3 commit f5fea18

File tree

9 files changed

+523
-0
lines changed

9 files changed

+523
-0
lines changed

.github/CODEOWNERS

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Code Owners for ExperimentFramework
2+
#
3+
# This file defines individuals or teams that are responsible for code in this repository.
4+
# Code owners are automatically requested for review when someone opens a pull request
5+
# that modifies code that they own.
6+
#
7+
# Learn more: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
8+
9+
# Default owner for everything in the repo
10+
* @JerrettDavis
11+
12+
# GitHub Actions workflows and CI/CD configuration
13+
/.github/ @JerrettDavis
14+
/.github/workflows/ @JerrettDavis
15+
16+
# Documentation
17+
/docs/ @JerrettDavis
18+
*.md @JerrettDavis
19+
20+
# Core framework code
21+
/src/ @JerrettDavis
22+
23+
# Tests
24+
/tests/ @JerrettDavis
25+
26+
# Build and tooling
27+
/tools/ @JerrettDavis
28+
Directory.Build.props @JerrettDavis
29+
GitVersion.yml @JerrettDavis

.github/QUICK_REFERENCE.md

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# ExperimentFramework Quick Reference
2+
3+
This document provides quick reference information for common operations in the ExperimentFramework repository.
4+
5+
## Table of Contents
6+
- [Prerequisites](#prerequisites)
7+
- [Getting Started](#getting-started)
8+
- [Building](#building)
9+
- [Testing](#testing)
10+
- [Running Benchmarks](#running-benchmarks)
11+
- [Documentation](#documentation)
12+
- [CI/CD](#cicd)
13+
- [Contributing](#contributing)
14+
15+
## Prerequisites
16+
17+
- [.NET SDK 8.0, 9.0, or 10.0](https://dotnet.microsoft.com/download)
18+
- Git
19+
- A code editor (Visual Studio, VS Code, Rider, etc.)
20+
21+
## Getting Started
22+
23+
### Clone the Repository
24+
```bash
25+
git clone https://github.com/JerrettDavis/ExperimentFramework.git
26+
cd ExperimentFramework
27+
```
28+
29+
### Restore Dependencies
30+
```bash
31+
dotnet restore --use-lock-file
32+
dotnet tool restore
33+
```
34+
35+
## Building
36+
37+
### Build the Solution
38+
```bash
39+
# Debug build
40+
dotnet build ExperimentFramework.slnx
41+
42+
# Release build
43+
dotnet build ExperimentFramework.slnx --configuration Release
44+
```
45+
46+
## Testing
47+
48+
### Run All Tests
49+
```bash
50+
dotnet test ExperimentFramework.slnx
51+
```
52+
53+
### Run Tests with Coverage
54+
```bash
55+
dotnet test ExperimentFramework.slnx \
56+
--configuration Release \
57+
--collect:"XPlat Code Coverage" \
58+
--settings tests/ExperimentFramework.Tests/coverage.runsettings
59+
```
60+
61+
### Generate Coverage Report
62+
```bash
63+
dotnet tool update -g dotnet-reportgenerator-globaltool
64+
REPORTS=$(find . -type f -path "*/TestResults/*/coverage.cobertura.xml" | tr '\n' ';')
65+
reportgenerator \
66+
-reports:"$REPORTS" \
67+
-targetdir:"coverage-report" \
68+
-reporttypes:"HtmlInline;Cobertura"
69+
```
70+
71+
## Running Benchmarks
72+
73+
### Windows
74+
```powershell
75+
.\run-benchmarks.ps1
76+
```
77+
78+
### Linux/macOS
79+
```bash
80+
./run-benchmarks.sh
81+
```
82+
83+
## Documentation
84+
85+
### Build Documentation Locally
86+
```bash
87+
dotnet tool update -g docfx
88+
docfx docs/docfx.json --serve
89+
```
90+
91+
Then navigate to `http://localhost:8080` in your browser.
92+
93+
### Generate Configuration Schemas
94+
```bash
95+
dotnet run --project tools/ExperimentFramework.SchemaGenerator/ExperimentFramework.SchemaGenerator.csproj -- ./artifacts/schemas
96+
```
97+
98+
## CI/CD
99+
100+
### Workflows
101+
102+
The repository includes the following GitHub Actions workflows:
103+
104+
- **CI (`ci.yml`)**: Runs on PRs and main branch pushes
105+
- PR checks: Build, test, and code coverage
106+
- Release: Version, pack, and publish NuGet packages
107+
108+
- **CodeQL (`codeql-analysis.yml`)**: Security analysis
109+
110+
- **Documentation (`docs.yml`)**: Publishes documentation to GitHub Pages
111+
112+
- **Dependency Review (`dependency-review.yml`)**: Scans PRs for dependency vulnerabilities
113+
114+
- **Labeler (`labeler.yml`)**: Automatically labels PRs based on changed files
115+
116+
- **Stale (`stale.yml`)**: Marks and closes stale issues/PRs
117+
118+
- **Update Packages (`update-packages.yml`)**: Reports outdated packages
119+
120+
### Dependabot
121+
122+
Dependabot is configured to:
123+
- Update NuGet packages weekly
124+
- Update GitHub Actions weekly
125+
- Group minor and patch updates together
126+
127+
## Contributing
128+
129+
### Branch Naming
130+
- `feature/` - New features
131+
- `bugfix/` - Bug fixes
132+
- `hotfix/` - Critical fixes
133+
- `docs/` - Documentation changes
134+
135+
### Commit Messages
136+
Follow conventional commits format:
137+
```
138+
<type>(<scope>): <description>
139+
140+
[optional body]
141+
142+
[optional footer]
143+
```
144+
145+
Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
146+
147+
### Pull Requests
148+
1. Create a feature branch from `main`
149+
2. Make your changes
150+
3. Ensure all tests pass
151+
4. Fill out the PR template
152+
5. Request review from code owners
153+
154+
### Code Owners
155+
- All code: @JerrettDavis
156+
- See `.github/CODEOWNERS` for detailed ownership
157+
158+
## Useful Commands
159+
160+
### Clean Build Artifacts
161+
```bash
162+
dotnet clean ExperimentFramework.slnx
163+
find . -name "bin" -o -name "obj" | xargs rm -rf
164+
```
165+
166+
### Update Global Tools
167+
```bash
168+
dotnet tool restore
169+
dotnet tool update -g docfx
170+
dotnet tool update -g dotnet-reportgenerator-globaltool
171+
```
172+
173+
### Create NuGet Packages
174+
```bash
175+
dotnet pack ExperimentFramework.slnx \
176+
--configuration Release \
177+
--output ./artifacts
178+
```
179+
180+
## Troubleshooting
181+
182+
### Build Errors
183+
- Ensure you have the correct .NET SDK versions installed
184+
- Run `dotnet restore --use-lock-file` to restore dependencies
185+
- Clean the solution: `dotnet clean ExperimentFramework.slnx`
186+
187+
### Test Failures
188+
- Check test output for specific error messages
189+
- Ensure all dependencies are restored
190+
- Run tests in isolation to identify flaky tests
191+
192+
### Coverage Report Issues
193+
- Ensure `reportgenerator` is installed: `dotnet tool update -g dotnet-reportgenerator-globaltool`
194+
- Check that coverage files exist in `TestResults` directories
195+
196+
## Resources
197+
198+
- [Project Documentation](https://jerrettdavis.github.io/ExperimentFramework/)
199+
- [Issue Tracker](https://github.com/JerrettDavis/ExperimentFramework/issues)
200+
- [Pull Requests](https://github.com/JerrettDavis/ExperimentFramework/pulls)
201+
- [Discussions](https://github.com/JerrettDavis/ExperimentFramework/discussions)
202+
203+
## License
204+
205+
This project is licensed under the terms specified in the [LICENSE](../LICENSE) file.

.github/dependabot.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for NuGet
4+
- package-ecosystem: "nuget"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "JerrettDavis"
13+
labels:
14+
- "dependencies"
15+
- "nuget"
16+
commit-message:
17+
prefix: "chore"
18+
include: "scope"
19+
groups:
20+
# Group all non-security updates together
21+
minor-and-patch:
22+
applies-to: version-updates
23+
update-types:
24+
- "minor"
25+
- "patch"
26+
27+
# Enable version updates for GitHub Actions
28+
- package-ecosystem: "github-actions"
29+
directory: "/"
30+
schedule:
31+
interval: "weekly"
32+
day: "monday"
33+
time: "09:00"
34+
reviewers:
35+
- "JerrettDavis"
36+
labels:
37+
- "dependencies"
38+
- "github-actions"
39+
commit-message:
40+
prefix: "chore"
41+
include: "scope"

.github/labeler.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Labeler configuration for automatic PR labeling
2+
# See https://github.com/actions/labeler for more information
3+
4+
# Source code labels
5+
"area: core":
6+
- changed-files:
7+
- any-glob-to-any-file: "src/ExperimentFramework/**"
8+
9+
"area: benchmarks":
10+
- changed-files:
11+
- any-glob-to-any-file: "benchmarks/**"
12+
13+
"area: tests":
14+
- changed-files:
15+
- any-glob-to-any-file: "tests/**"
16+
17+
"area: samples":
18+
- changed-files:
19+
- any-glob-to-any-file: "samples/**"
20+
21+
"area: tools":
22+
- changed-files:
23+
- any-glob-to-any-file: "tools/**"
24+
25+
# Documentation labels
26+
"documentation":
27+
- changed-files:
28+
- any-glob-to-any-file:
29+
- "docs/**"
30+
- "**/*.md"
31+
- "README.md"
32+
33+
# CI/CD labels
34+
"ci/cd":
35+
- changed-files:
36+
- any-glob-to-any-file:
37+
- ".github/workflows/**"
38+
- ".github/dependabot.yml"
39+
40+
# Configuration labels
41+
"configuration":
42+
- changed-files:
43+
- any-glob-to-any-file:
44+
- "**/*.yml"
45+
- "**/*.yaml"
46+
- "**/*.json"
47+
- "**/*.config"
48+
- "Directory.Build.props"
49+
- "GitVersion.yml"
50+
51+
# Dependencies
52+
"dependencies":
53+
- changed-files:
54+
- any-glob-to-any-file:
55+
- "**/packages.lock.json"
56+
- "**/*.csproj"

.github/pull_request_template.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
## Description
2+
<!-- Provide a clear and concise description of the changes in this PR -->
3+
4+
## Type of Change
5+
<!-- Mark the relevant option with an 'x' -->
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Performance improvement
12+
- [ ] Code refactoring
13+
- [ ] Dependency update
14+
- [ ] CI/CD changes
15+
16+
## Related Issues
17+
<!-- Link to related issues using #issue-number or "Fixes #issue-number" -->
18+
19+
Fixes #
20+
21+
## Changes Made
22+
<!-- Provide a bulleted list of the specific changes made -->
23+
24+
-
25+
-
26+
-
27+
28+
## Testing
29+
<!-- Describe the tests you ran to verify your changes -->
30+
31+
- [ ] Unit tests pass locally
32+
- [ ] Integration tests pass locally
33+
- [ ] All existing tests pass
34+
- [ ] Added new tests for new functionality
35+
- [ ] Manual testing performed
36+
37+
### Test Configuration
38+
<!-- If applicable, provide details about your test configuration -->
39+
40+
- **OS**:
41+
- **.NET Version**:
42+
- **Other details**:
43+
44+
## Checklist
45+
<!-- Mark completed items with an 'x' -->
46+
47+
- [ ] My code follows the style guidelines of this project
48+
- [ ] I have performed a self-review of my own code
49+
- [ ] I have commented my code, particularly in hard-to-understand areas
50+
- [ ] I have made corresponding changes to the documentation
51+
- [ ] My changes generate no new warnings
52+
- [ ] I have added tests that prove my fix is effective or that my feature works
53+
- [ ] New and existing unit tests pass locally with my changes
54+
- [ ] Any dependent changes have been merged and published
55+
56+
## Screenshots (if applicable)
57+
<!-- Add screenshots to help explain your changes -->
58+
59+
## Additional Context
60+
<!-- Add any other context about the pull request here -->

0 commit comments

Comments
 (0)