Skip to content

Commit

Permalink
Split Test and NuGet Push (#50)
Browse files Browse the repository at this point in the history
nuget.yaml: the nuget push is executed only when there is a TAG
test.yaml: it does not contain the nuget push anymore
  • Loading branch information
Gsantomaggio authored Jan 25, 2022
1 parent b40c00d commit ae69253
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: .NET

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
tags:
- '*'

jobs:
build:
Expand Down Expand Up @@ -34,8 +33,6 @@ jobs:
run: dotnet build --no-restore
- name: Test
run: dotnet test Tests/Tests.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true
- name: Upload code coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Publish RabbitMQ.Stream.Client
uses: brandedoutcast/publish-nuget@v2.5.2
with:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: .NET

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

jobs:
build:
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:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test Tests/Tests.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true
- name: Upload code coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)

0 comments on commit ae69253

Please sign in to comment.