Skip to content

Commit

Permalink
Merge pull request #70 from rabbitmq/rabbitmq-stream-dotnet-client-69
Browse files Browse the repository at this point in the history
Port useful things from RabbitMQ .NET Client project
  • Loading branch information
lukebakken authored Feb 16, 2022
2 parents b7e133c + 2bfd1b7 commit 90c175d
Show file tree
Hide file tree
Showing 12 changed files with 1,276 additions and 46 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: rabbitmq-stream-dotnet-client

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-win32:
name: build/test on windows-latest

runs-on: windows-latest

steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Cache installers
uses: actions/cache@v2
with:
# Note: the cache path is relative to the workspace directory
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
path: ~/installers
key: ${{ runner.os }}-v0-${{ hashFiles('tools/versions.json') }}
- name: Cache NuGet packages
uses: actions/cache@v2
with:
path: |
~/.nuget/packages
~/AppData/Local/NuGet/v3-cache
key: ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-v1-nuget-
- name: Install and start RabbitMQ
run: ./tools/install.ps1
- name: List NuGet sources
run: dotnet nuget locals all --list
- name: Restore
run: dotnet restore --verbosity=normal
- name: Build
run: dotnet build --no-restore --verbosity=normal
- name: Test
run: dotnet test --no-build --logger "console;verbosity=detailed"

build:
name: build/test on ubuntu-latest

runs-on: ubuntu-latest

services:
rabbitmq:
image: pivotalrabbitmq/rabbitmq-stream
env:
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: -rabbitmq_stream advertised_host localhost
ports:
- 5552:5552
- 5672:5672
- 15672:15672
- 1883:1883
- 61613:61613

steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Cache NuGet packages
uses: actions/cache@v2
with:
path: |
~/.nuget/packages
~/.local/share/NuGet/v3-cache
key: ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-v1-nuget-
- name: List NuGet sources
run: dotnet nuget locals all --list
- name: Restore
run: dotnet restore --verbosity=normal
- name: Build
run: dotnet build --no-restore --verbosity=normal
- name: Test
run: dotnet test --no-build --logger "console;verbosity=detailed" /p:AltCover=true
- name: Upload code coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
38 changes: 0 additions & 38 deletions .github/workflows/test.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
---
<div style="text-align:center;">

![tests](https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/actions/workflows/nuget.yml//badge.svg)
[![Build Status](https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/workflows/main.yaml/badge.svg)](https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/actions)

[![codecov](https://codecov.io/gh/rabbitmq/rabbitmq-stream-dotnet-client/branch/main/graph/badge.svg?token=OIA04ZQD79)](https://codecov.io/gh/rabbitmq/rabbitmq-stream-dotnet-client)
</div>

Expand Down
Loading

0 comments on commit 90c175d

Please sign in to comment.