-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Fresa/upgrade-to-latest-protocol-version
Upgrade to latest protocol version
- Loading branch information
Showing
30 changed files
with
716 additions
and
341 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @Fresa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
mode: ContinuousDelivery | ||
# Conventional Commits https://www.conventionalcommits.org/en/v1.0.0/ | ||
# https://regex101.com/r/Ms7Vx6/2 | ||
major-version-bump-message: "(build|chore|ci|docs|doc|feat|fix|perf|refactor|revert|style|test)(\\([a-z]+\\))?(!: .+|: (.+\\n\\n)+BREAKING CHANGE: .+)" | ||
# https://regex101.com/r/Oqhi2m/1 | ||
minor-version-bump-message: "(feat)(\\([a-z]+\\))?: .+" | ||
# https://regex101.com/r/f5C4fP/1 | ||
patch-version-bump-message: "(build|chore|ci|docs|doc|fix|perf|refactor|revert|style|test)(\\([a-z]+\\))?: .+" | ||
# Match nothing | ||
no-bump-message: ^\b$ | ||
continuous-delivery-fallback-tag: '' | ||
branches: | ||
development: | ||
increment: Patch | ||
# Everything except main and master | ||
regex: ^(?!(main|master)$) | ||
track-merge-target: true | ||
source-branches: [] | ||
feature: | ||
# Match nothing | ||
regex: ^\b$ | ||
develop: | ||
# Match nothing | ||
regex: ^\b$ | ||
main: | ||
source-branches: [] | ||
release: | ||
# Match nothing | ||
regex: ^\b$ | ||
pull-request: | ||
# Match nothing | ||
regex: ^\b$ | ||
hotfix: | ||
# Match nothing | ||
regex: ^\b$ | ||
support: | ||
# Match nothing | ||
regex: ^\b$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Continuous Delivery | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
test: | ||
name: Build & Test | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.x | ||
- name: Build | ||
run: dotnet build -c Release | ||
- name: Test | ||
run: dotnet test -c Release --no-build --verbosity normal | ||
|
||
release: | ||
name: Create Release | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Fetches entire history, so we can analyze commits since last tag | ||
fetch-depth: 0 | ||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/setup@v0.9.7 | ||
with: | ||
versionSpec: '5.x' | ||
- name: Determine Version | ||
id: gitversion | ||
uses: gittools/actions/gitversion/execute@v0 | ||
with: | ||
useConfigFile: true | ||
configFilePath: .github/version_config.yml | ||
- name: Determine Release Info | ||
id: release | ||
run: | | ||
from_tag=$(git tag --points-at ${{ steps.gitversion.outputs.versionSourceSha }} | grep -m 1 ^v[0-9]*\.[0-9]*\.[0-9]* | head -1) | ||
[[ -z "$from_tag" ]] && \ | ||
from_ref_exclusive=${{ steps.gitversion.outputs.versionSourceSha }} || \ | ||
from_ref_exclusive=$from_tag | ||
[[ -z "${{ steps.gitversion.outputs.preReleaseTag }}" ]] && \ | ||
is_prerelease=false || \ | ||
is_prerelease=true | ||
[[ $is_prerelease == true ]] && \ | ||
version=${{ steps.gitversion.outputs.majorMinorPatch }}-pre-${{ steps.gitversion.outputs.commitsSinceVersionSource }} || \ | ||
version=${{ steps.gitversion.outputs.majorMinorPatch }} | ||
echo "::set-output name=is_prerelease::$is_prerelease" | ||
echo "::set-output name=tag::v$version" | ||
echo "::set-output name=version::$version" | ||
echo "::set-output name=from_ref_exclusive::$from_ref_exclusive" | ||
- name: Create Tag | ||
uses: actions/github-script@v3 | ||
with: | ||
script: | | ||
github.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: "refs/tags/${{ steps.release.outputs.tag }}", | ||
sha: "${{ steps.gitversion.outputs.sha }}" | ||
}); | ||
- name: Generate Release Notes | ||
id: release_notes | ||
uses: Fresa/release-notes-generator@v0 | ||
with: | ||
version: ${{ steps.release.outputs.tag }} | ||
from_ref_exclusive: ${{ steps.release.outputs.from_ref_exclusive }} | ||
to_ref_inclusive: ${{ steps.release.outputs.tag }} | ||
- name: Create Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: ${{ steps.release_notes.outputs.release_notes }} | ||
tag_name: ${{ steps.release.outputs.tag }} | ||
prerelease: ${{ steps.release.outputs.is_prerelease }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Update Latest Minor Tag | ||
uses: EndBug/latest-tag@v1 | ||
if: steps.release.outputs.is_prerelease == 'false' | ||
with: | ||
tag-name: v${{ steps.gitversion.outputs.major }} | ||
description: ${{ steps.release.outputs.tag }} | ||
- name: Update Latest Patch Tag | ||
uses: EndBug/latest-tag@v1 | ||
if: steps.release.outputs.is_prerelease == 'false' | ||
with: | ||
tag-name: v${{ steps.gitversion.outputs.major }}.${{ steps.gitversion.outputs.minor }} | ||
description: ${{ steps.release.outputs.tag }} | ||
- name: Pack | ||
env: | ||
release_notes: ${{ steps.release_notes.outputs.release_notes }} | ||
run: dotnet pack src/Kafka.TestFramework/Kafka.TestFramework.csproj -c Release -o nuget-packages -p:PackageVersion=${{ steps.release.outputs.version }} -p:PackageReleaseNotes="$release_notes" | ||
- name: Publish to nuget.org | ||
run: dotnet nuget push nuget-packages/Kafka.TestFramework.${{ steps.release.outputs.version }}.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# Kafka.TestFramework | ||
An in-memory test framework for Kafka clients which can be used to subscribe on request messages and respond with response messages. The test server can be used in-memory or connected to clients over TCP. | ||
|
||
[![Build status](https://ci.appveyor.com/api/projects/status/3by56qq57a8or5a2?svg=true)](https://ci.appveyor.com/project/Fresa/kafka-testframework) | ||
|
||
[![Build history](https://buildstats.info/appveyor/chart/Fresa/kafka-testframework)](https://ci.appveyor.com/project/Fresa/kafka-testframework/history) | ||
[![Continuous Delivery](https://github.com/Fresa/Kafka.TestFramework/actions/workflows/ci.yml/badge.svg)](https://github.com/Fresa/Kafka.TestFramework/actions/workflows/ci.yml) | ||
|
||
## Download | ||
https://www.nuget.org/packages/kafka.testframework | ||
|
||
## Getting Started | ||
The test framework can be used in-memory or by setting up a TCP socket that the kafka client can connect to. See the [`integration tests`](https://github.com/Fresa/Kafka.TestFramework/blob/master/tests/Kafka.TestFramework.Tests). | ||
|
||
### v2.x | ||
Now supports [Kafka.Protocol](https://github.com/Fresa/Kafka.Protocol) v2.x. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Kafka.TestFramework | ||
{ | ||
internal static class AsyncDisposableExtensions | ||
{ | ||
internal static Task DisposeAllAsync( | ||
this IEnumerable<IAsyncDisposable> disposables) | ||
=> disposables.Select(client => client.DisposeAsync()) | ||
.WhenAllAsync(); | ||
} | ||
} |
Oops, something went wrong.