.NET 8 (LTS) #46
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: Millistream.Streaming CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'Source/Millistream.Streaming/**' | |
- 'Tests/Millistream.Streaming.UnitTests/**' | |
- 'Tests/Millistream.Streaming.IntegrationTests/**' | |
- '.github/workflows/millistream.streaming.ci.yml' | |
- '.github/workflows/millistream.streaming.cd.yml' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'Source/Millistream.Streaming/**' | |
- 'Tests/Millistream.Streaming.UnitTests/**' | |
- 'Tests/Millistream.Streaming.IntegrationTests/**' | |
- '.github/workflows/millistream.streaming.ci.yml' | |
- '.github/workflows/millistream.streaming.cd.yml' | |
workflow_dispatch: | |
jobs: | |
Build: | |
strategy: | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup the .NET 8 SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build on macOS/Linux | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
dotnet build Source/Millistream.Streaming/Millistream.Streaming.csproj -c Release -f netstandard1.4 | |
dotnet build Tests/Millistream.Streaming.UnitTests/Millistream.Streaming.UnitTests.csproj -c Release -f net8.0 | |
dotnet build Tests/Millistream.Streaming.IntegrationTests/Millistream.Streaming.IntegrationTests.csproj -c Release -f net8.0 | |
- name: Build on Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: bash | |
run: | | |
dotnet build Source/Millistream.Streaming/Millistream.Streaming.csproj -c Release | |
dotnet build Tests/Millistream.Streaming.UnitTests/Millistream.Streaming.UnitTests.csproj -c Release | |
dotnet build Tests/Millistream.Streaming.IntegrationTests/Millistream.Streaming.IntegrationTests.csproj -c Release | |
- name: Run Unit Tests on macOS/Linux | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
dotnet test Tests/Millistream.Streaming.UnitTests/Millistream.Streaming.UnitTests.csproj -c Release -f net8.0 --no-build --no-restore | |
- name: Run Unit Tests on Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
dotnet test Tests/Millistream.Streaming.UnitTests/Millistream.Streaming.UnitTests.csproj -c Release --no-build --no-restore | |
- name: Download and Install libmdf on macOS | |
if: ${{ matrix.os == 'macOS-latest' }} | |
run: | | |
curl -O https://packages.millistream.com/macOS/libmdf-1.0.26.pkg | |
sudo installer -pkg libmdf-1.0.26.pkg -target / | |
- name: Download and Install libmdf on Linux | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
#download | |
wget https://packages.millistream.com/source/libmdf-1.0.26.tar.gz | |
#unpack | |
tar -zxf libmdf-1.0.26.tar.gz | |
cd libmdf-1.0.26 | |
#compile | |
./configure --prefix=/usr | |
make | |
sudo make install | |
- name: Download and Install libmdf on Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
shell: powershell | |
run: | | |
(new-object System.Net.WebClient).DownloadFile('https://packages.millistream.com/Windows/libmdf-1.0.26.exe','libmdf-1.0.26.exe') | |
.\libmdf-1.0.26.exe /S | |
- name: Set Credentials | |
shell: pwsh | |
env: | |
HOSTNAME: ${{ secrets.HOSTNAME }} | |
USERNAME: ${{ secrets.USERNAME }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
run: | | |
[xml]$doc = Get-Content Tests/Millistream.Streaming.IntegrationTests/TestSettings.runsettings | |
$doc.RunSettings.TestRunParameters.ChildNodes.Item(0).value = "$env:HOSTNAME" | |
$doc.RunSettings.TestRunParameters.ChildNodes.Item(1).value = "$env:USERNAME" | |
$doc.RunSettings.TestRunParameters.ChildNodes.Item(2).value = "$env:PASSWORD" | |
$doc.Save("UpdatedTestSettings.runsettings") | |
- name: Run Integration Tests on macOS/Linux | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
dotnet test Tests/Millistream.Streaming.IntegrationTests/Millistream.Streaming.IntegrationTests.csproj -c Release -f net8.0 --no-build --no-restore -s UpdatedTestSettings.runsettings | |
- name: Run Integration Tests on Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
dotnet test Tests/Millistream.Streaming.IntegrationTests/Millistream.Streaming.IntegrationTests.csproj -c Release --no-build --no-restore -s UpdatedTestSettings.runsettings | |
- name: Remove the .runsettings file | |
shell: pwsh | |
run: Remove-Item UpdatedTestSettings.runsettings |