-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #934 Check out submodules, ensure that preview language features are not used Ensure that preview language features are not used Run tests on Windows using powershell to set the rabbitmqctl.bat path Gotta set ERLANG_HOME too...
- Loading branch information
1 parent
389819a
commit 6a4f869
Showing
9 changed files
with
174 additions
and
62 deletions.
There are no files selected for viewing
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,88 @@ | ||
name: rabbitmq-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 | ||
with: | ||
submodules: true | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.x | ||
- 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 }}-v0-nuget-${{ hashFiles('**/*.csproj') }} | ||
restore-keys: | | ||
${{ runner.os }}-v0-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: ./tools/gha-run-tests.ps1 | ||
|
||
build: | ||
name: build/test on ubuntu-latest | ||
|
||
runs-on: ubuntu-latest | ||
|
||
services: | ||
rabbitmq: | ||
image: rabbitmq:3.9-management | ||
ports: | ||
- 5672:5672 | ||
- 15672:15672 | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.x | ||
- name: Cache NuGet packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.nuget/packages | ||
~/.local/share/NuGet/v3-cache | ||
key: ${{ runner.os }}-v0-nuget-${{ hashFiles('**/*.csproj') }} | ||
restore-keys: | | ||
${{ runner.os }}-v0-nuget- | ||
- 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" | ||
env: | ||
RABBITMQ_RABBITMQCTL_PATH: DOCKER:${{job.services.rabbitmq.id}} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@ECHO OFF | ||
set DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
dotnet restore .\RabbitMQDotNetClient.sln | ||
dotnet build .\RabbitMQDotNetClient.sln | ||
dotnet restore --verbosity=normal .\RabbitMQDotNetClient.sln | ||
dotnet build --verbosity=normal .\RabbitMQDotNetClient.sln |
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
$ProgressPreference = 'Continue' | ||
$ErrorActionPreference = 'Stop' | ||
Set-StrictMode -Version 2.0 | ||
|
||
$erlang_reg_path = 'HKLM:\SOFTWARE\Ericsson\Erlang' | ||
if (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\') | ||
{ | ||
$erlang_reg_path = 'HKLM:\SOFTWARE\WOW6432Node\Ericsson\Erlang' | ||
} | ||
$erlang_erts_version = Get-ChildItem -Path $erlang_reg_path -Name | ||
$erlang_home = (Get-ItemProperty -LiteralPath $erlang_reg_path\$erlang_erts_version).'(default)' | ||
|
||
Write-Host "[INFO] Setting ERLANG_HOME to '$erlang_home'..." | ||
$env:ERLANG_HOME = $erlang_home | ||
[Environment]::SetEnvironmentVariable('ERLANG_HOME', $erlang_home, 'Machine') | ||
|
||
$regPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ' | ||
if (Test-Path 'HKLM:\SOFTWARE\WOW6432Node\') | ||
{ | ||
$regPath = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ' | ||
} | ||
|
||
$rabbitmq_base_path = Split-Path -Parent (Get-ItemProperty $regPath 'UninstallString').UninstallString | ||
$rabbitmq_version = (Get-ItemProperty $regPath "DisplayVersion").DisplayVersion | ||
$rabbitmqctl_path = Join-Path -Path $rabbitmq_base_path -ChildPath "rabbitmq_server-$rabbitmq_version" | Join-Path -ChildPath 'sbin' | Join-Path -ChildPath 'rabbitmqctl.bat' | ||
|
||
Write-Host "[INFO] Setting RABBITMQ_RABBITMQCTL_PATH to '$rabbitmqctl_path'..." | ||
$env:RABBITMQ_RABBITMQCTL_PATH = $rabbitmqctl_path | ||
[Environment]::SetEnvironmentVariable('RABBITMQ_RABBITMQCTL_PATH', $rabbitmqctl_path, 'Machine') | ||
|
||
$solution_file = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'RabbitMQDotNetClient.sln' | ||
dotnet test --no-build --logger "console;verbosity=detailed" $solution_file |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"erlang": "24.2.1", | ||
"rabbitmq": "3.9.13" | ||
} |