Skip to content

carlescs/TestFizzBuzz

Repository files navigation

TestFizzBuzz

A generic FizzBuzzTest implementing semantic commits and automated versioning.

Overview

This .NET 9.0 console application demonstrates:

  • Generic FizzBuzz algorithm with extension methods
  • Comprehensive unit testing with xUnit
  • Semantic commit conventions with automated versioning
  • CI/CD integration with GitHub Actions and Azure DevOps

Quick Start

# Clone and build
git clone https://github.com/carlescs/TestFizzBuzz.git
cd TestFizzBuzz
dotnet restore
dotnet build
dotnet test

# Run application
dotnet run --project TestFizzBuzz

Semantic Commits

This project uses Conventional Commits for automated semantic versioning.

Commit Format

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Examples

feat: add custom predicates support        # Minor version bump
fix: handle null input gracefully          # Patch version bump  
feat!: change return type to async         # Major version bump
docs: update README with examples          # No version bump

📖 See Semantic Commits Guide for detailed conventional commits documentation

Versioning

Versions are automatically calculated using GitVersion based on commit messages:

  • Major (1.0.0): Breaking changes (feat!: or BREAKING CHANGE:)
  • Minor (0.1.0): New features (feat:)
  • Patch (0.0.1): Bug fixes (fix:) and performance improvements (perf:)

Current version is embedded in assemblies during build and shown in CI/CD pipelines.

Development

Prerequisites

  • .NET 9.0 SDK
  • Git with semantic commit template configured

Setup

# Configure git commit template
git config commit.template .gitmessage

# Install GitVersion (optional, for local version testing)
dotnet tool install --global GitVersion.Tool

# Check current version
dotnet gitversion

Building

dotnet restore
dotnet build --configuration Release    # Includes semantic versioning
dotnet test --verbosity normal

CI/CD

  • GitHub Actions: Automated builds, tests, and releases
  • Azure DevOps: SonarCloud analysis and Qodana scanning
  • Versioned Artifacts: All builds tagged with semantic versions
  • Automated Releases: Created for master branch with concise release notes

About

A generic FizzBuzzTest

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages