Skip to content

Initial release automation #63

Initial release automation

Initial release automation #63

Workflow file for this run

name: Test
on:
pull_request: {}
push:
branches:
- main
jobs:
dotnet:
name: dotnet
runs-on: ubuntu-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
steps:
- name: Install nats-server
run: |
docker run --rm --entrypoint cat nats:alpine /usr/local/bin/nats-server \
| sudo tee /usr/local/bin/nats-server >/dev/null
sudo chmod +x /usr/local/bin/nats-server
nats-server -v
- name: Checkout
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x'
- name: Build
run: dotnet build -c Debug
- name: Test
run: dotnet test -c Debug --no-build tests/NATS.Client.Core.Tests/NATS.Client.Core.Tests.csproj
memory_test:
name: memory test
runs-on: windows-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
NUGET_XMLDOC_MODE: skip
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x'
- name: Get nats-server
run: |
Invoke-WebRequest https://github.com/nats-io/nats-server/releases/download/v2.9.17/nats-server-v2.9.17-windows-amd64.zip -OutFile tools-nats-server.zip
Expand-Archive tools-nats-server.zip
$current_path = (Get-Item .).FullName
echo "$current_path\tools-nats-server\nats-server-v2.9.17-windows-amd64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Check nats-server
run: nats-server -v
- name: Get tools
run: |
Invoke-WebRequest https://download.jetbrains.com/resharper/JetBrains.dotMemoryUnit.3.2.20220510.zip -OutFile dotMemoryUnit.zip
Expand-Archive dotMemoryUnit.zip
nuget install NUnit.ConsoleRunner -version 3.16.3
$current_path = (Get-Item .).FullName
echo "$current_path\dotMemoryUnit" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build
run: dotnet build -c Debug
- name: Memory Test
run: dotMemoryUnit .\NUnit.ConsoleRunner.3.16.3\tools\nunit3-console.exe --propagate-exit-code -- .\tests\NATS.Client.Core.MemoryTests\bin\Debug\net6.0\NATS.Client.Core.MemoryTests.dll