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
43 changes: 0 additions & 43 deletions .github/workflows/main-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,56 +47,13 @@ jobs:
- name: Install Task
uses: go-task/setup-task@v2

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: 'zulu'

- name: Cache SonarQube packages
uses: actions/cache@v5
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarQube scanner
id: cache-sonar-scanner
uses: actions/cache@v5
with:
path: ~/.sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner

- name: Install SonarQube scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.sonar/scanner
dotnet tool update dotnet-sonarscanner --tool-path ~/.sonar/scanner

- name: Start SonarQube
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
~/.sonar/scanner/dotnet-sonarscanner begin \
/k:"j-d-ha_minimal-lambda" \
/o:"j-d-ha" \
/d:sonar.exclusions="**/bin/**,**/obj/**,tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/**,**/coverage/**,**/.nuget/**,**/packages/**,src/MinimalLambda.Testing/HostFactoryResolver.cs" \
/d:sonar.coverage.exclusions="**/*" \
/d:sonar.token="$SONAR_TOKEN"

- name: Build
run: dotnet build --no-restore --configuration Release /p:TreatWarningsAsErrors=true

- name: Run tests
timeout-minutes: 3
run: task test:ci

- name: Stop SonarQube
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ~/.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="$SONAR_TOKEN"

- name: Validate AOT Compatability
run: task build:aot-check

Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,56 +50,13 @@ jobs:
- name: Install Task
uses: go-task/setup-task@v2

- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 17
distribution: 'zulu'

- name: Cache SonarQube packages
uses: actions/cache@v5
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarQube scanner
id: cache-sonar-scanner
uses: actions/cache@v5
with:
path: ~/.sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner

- name: Install SonarQube scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.sonar/scanner
dotnet tool update dotnet-sonarscanner --tool-path ~/.sonar/scanner

- name: Start SonarQube
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
~/.sonar/scanner/dotnet-sonarscanner begin \
/k:"j-d-ha_minimal-lambda" \
/o:"j-d-ha" \
/d:sonar.exclusions="**/bin/**,**/obj/**,tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/**,**/coverage/**,**/.nuget/**,**/packages/**,src/MinimalLambda.Testing/HostFactoryResolver.cs" \
/d:sonar.coverage.exclusions="**/*" \
/d:sonar.token="$SONAR_TOKEN"

- name: Build
run: dotnet build --no-restore --configuration Release /p:TreatWarningsAsErrors=true

- name: Run tests
timeout-minutes: 3
run: task test:ci

- name: Stop SonarQube
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ~/.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="$SONAR_TOKEN"

- name: Validate AOT Compatability
run: task build:aot-check

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ nunit-*.xml
/.cache/
/.sonarqube/
/codecov*

**/.venv
64 changes: 39 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Contributing to MinimalLambda

Thank you for your interest in contributing to the MinimalLambda project! This document provides guidelines and instructions for contributing.
Thank you for your interest in contributing to the MinimalLambda project! This document provides
guidelines and instructions for contributing.

## Table of Contents

<!-- TOC -->

* [Contributing to MinimalLambda](#contributing-to-minimal-lambda)
* [Table of Contents](#table-of-contents)
* [Code of Conduct](#code-of-conduct)
Expand All @@ -22,11 +24,13 @@ Thank you for your interest in contributing to the MinimalLambda project! This d
* [CI/CD Integration](#cicd-integration)
* [Questions or Need Help?](#questions-or-need-help)
* [License](#license)

<!-- TOC -->

## Code of Conduct

We are committed to providing a welcoming and inclusive environment for all contributors. Please be respectful and constructive in all interactions.
We are committed to providing a welcoming and inclusive environment for all contributors. Please be
respectful and constructive in all interactions.

## Getting Started

Expand Down Expand Up @@ -75,22 +79,26 @@ dotnet clean

## Code Formatting

Code formatting is automated using **CleanupCode** and **CSharpier**, ensuring consistent style across the project. All PRs are checked for formatting compliance in CI/CD.
Code formatting is automated using **CleanupCode** and **CSharpier**, ensuring consistent style
across the project. All PRs are checked for formatting compliance in CI/CD.

### Formatting Tools

The project uses two complementary tools:

1. **CleanupCode**: JetBrains code cleanup tool
- Applies code organization and style rules
- Uses the "Built-in: Full Cleanup" profile configured in `MinimalLambda.sln.DotSettings`
- Handles code structure and consistency

- Applies code organization and style rules
- Uses the "Built-in: Full Cleanup" profile configured in `MinimalLambda.sln.DotSettings`
- Handles code structure and consistency

2. **CSharpier**: Opinionated C# code formatter
- Enforces consistent formatting (similar to Prettier for C#)
- Handles spacing, line breaks, and code layout

- Enforces consistent formatting (similar to Prettier for C#)
- Handles spacing, line breaks, and code layout

Tools can be installed using **NuGet**:

```bash
dotnet tool restore
```
Expand All @@ -111,7 +119,7 @@ task format:csharpier
```

Always run `task format` before committing changes. Failing to format code may cause CI/CD checks to
fail, as the GitHub Actions workflow (`pr-build.yaml`) includes a code quality check that runs
fail, as the GitHub Actions workflow (`pr-build.yaml`) includes a code quality check that runs
`task format` and validates no files were modified.

### IDE Integration
Expand All @@ -136,6 +144,7 @@ docs/description # Documentation updates
```

**Example**:

```bash
git checkout -b feature/#42-add-custom-serializer
git checkout -b bug/on-shutdown-generator-trying-to-return-void
Expand All @@ -158,7 +167,8 @@ We follow [Conventional Commits](https://www.conventionalcommits.org/) format:
- **feat**: A new feature (e.g., `feat(source-generators): add OnShutdown support`)
- **fix**: A bug fix (e.g., `fix(#73): update MapHandler source generation`)
- **docs**: Documentation updates (e.g., `docs(openTelemetry): add XML documentation`)
- **refactor**: Code refactoring without feature changes (e.g., `refactor(source-generators): simplify logic`)
- **refactor**: Code refactoring without feature changes (e.g.,
`refactor(source-generators): simplify logic`)
- **test**: Adding or updating tests (e.g., `test: add coverage for edge cases`)
- **chore**: Build, CI/CD, tooling, dependencies (e.g., `chore: update build targets`)
- **style**: Code style changes without logic changes (e.g., `style: simplify formatting`)
Expand Down Expand Up @@ -193,22 +203,25 @@ when using extension method syntax.
```

3. **Create a Pull Request** using the [PR template](/.github/pull_request_template.md):
- **Title must follow Conventional Commits format** (validated by CI)
- Format: `<type>(scope): <description>`
- Valid types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `ci`, `style`
- Reference related issues (e.g., `Closes #42`)
- Complete the PR template checklist
- Request review from maintainers

- **Title must follow Conventional Commits format** (validated by CI)
- Format: `<type>(scope): <description>`
- Valid types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `ci`, `style`
- Reference related issues (e.g., `Closes #42`)
- Complete the PR template checklist
- Request review from maintainers

4. **Respond to feedback**:
- Address review comments promptly
- Push additional commits to the same branch
- Avoid force-pushing after review has started

- Address review comments promptly
- Push additional commits to the same branch
- Avoid force-pushing after review has started

5. **Merge**:
- Ensure all checks pass (CI/CD, tests, code review)
- Maintainer will merge the PR
- Your branch will be deleted after merge

- Ensure all checks pass (CI/CD, tests, code review)
- Maintainer will merge the PR
- Your branch will be deleted after merge

## Code Style

Expand All @@ -223,7 +236,8 @@ when using extension method syntax.
### XML Documentation

- **Document all public APIs** with XML documentation tags
- **Use only standard C# XML tags**: `<summary>`, `<param>`, `<returns>`, `<exception>`, `<remarks>`, `<example>`
- **Use only standard C# XML tags**: `<summary>`, `<param>`, `<returns>`, `<exception>`,
`<remarks>`, `<example>`
- **Do NOT use unsupported tags** like `<strong>`, `<em>`, etc. (Use `<c>` for code/emphasis)
- **Example**:
```csharp
Expand Down Expand Up @@ -359,7 +373,6 @@ All pull requests run through automated checks:

- **Build**: `dotnet build`
- **Tests**: `dotnet test`
- **Code analysis**: SonarCloud analysis

Ensure your changes pass all checks before requesting review.

Expand All @@ -371,7 +384,8 @@ Ensure your changes pass all checks before requesting review.

## License

By contributing to this project, you agree that your contributions will be licensed under the same MIT License as the project.
By contributing to this project, you agree that your contributions will be licensed under the same
MIT License as the project.

---

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Main Build](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml/badge.svg)](https://github.com/j-d-ha/minimal-lambda/actions/workflows/main-build.yaml)
[![codecov](https://codecov.io/gh/j-d-ha/minimal-lambda/graph/badge.svg?token=BWORPTQ0UK)](https://codecov.io/gh/j-d-ha/minimal-lambda)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=j-d-ha_minimal-lambda&metric=alert_status&token=9fb519975d91379dcfbc6c13a4bd4207131af6e3)](https://sonarcloud.io/summary/new_code?id=j-d-ha_minimal-lambda)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

**Lambda-first hosting with Minimal API-inspired patterns** – Familiar .NET ergonomics with
Expand Down
Loading
Loading