Workflow file for this run
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
name: Test against supported .NET | ||
on: | ||
- workflow_call | ||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout tls-gen | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: rabbitmq/tls-gen | ||
path: './tls-gen' | ||
- name: Start broker | ||
run: ci/start-broker.sh | ||
- name: Start toxiproxy | ||
run: ci/start-toxiproxy.sh | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
6.x | ||
7.x | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.nuget/packages | ||
~/.local/share/NuGet/v4-cache | ||
key: ${{ runner.os }}-v2-nuget-${{ hashFiles('**/*.csproj') }} | ||
restore-keys: | | ||
${{ runner.os }}-v2-nuget- | ||
- name: Display DotNet version | ||
run: dotnet --version | ||
- name: Restore | ||
run: dotnet restore ./Build.csproj --verbosity=normal | ||
- name: Build | ||
run: dotnet build ./Build.csproj --no-restore --verbosity=normal | ||
- name: Verify | ||
run: dotnet format ./rabbitmq-amqp-dotnet-client.sln --no-restore --verbosity=diagnostic --verify-no-changes | ||
- name: Test | ||
run: dotnet test ./Build.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true | ||
- name: Stop toxiproxy | ||
run: docker stop toxiproxy && docker rm toxiproxy | ||
- name: Stop broker | ||
run: docker stop rabbitmq && docker rm rabbitmq |