8585 name : Build test solution
8686 command : dotnet build --configuration Release --no-restore NuoDb.EntityFrameworkCore.Tests/NuoDb.EntityFrameworkCore.Tests.csproj
8787
88+ unit-tests-linux :
89+ machine :
90+ image : ubuntu-2004:2024.11.1
91+ resource_class : medium
92+ environment :
93+ IMG_NAME : " nuodb/nuodb:6.0.2-9"
94+ steps :
95+ - checkout
96+ - run :
97+ name : Add dotnet repo
98+ command : |
99+ wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
100+ sudo dpkg -i packages-microsoft-prod.deb
101+ rm packages-microsoft-prod.deb
102+ - run :
103+ name : Install make
104+ command : sudo apt update && sudo apt install -y dotnet-sdk-6.0 dotnet-sdk-8.0
105+ - run :
106+ name : Install JetBrains dotCover CLI and Logger package
107+ command : |
108+ dotnet tool install --global JetBrains.dotCover.CommandLineTools
109+ dotnet add NUnitTestProjectCore/NUnitTestProjectCore.csproj package JunitXml.TestLogger
110+ - run :
111+ name : Restore packages
112+ command : dotnet restore NUnitTestProjectCore/NUnitTestProjectCore.csproj
113+ - run :
114+ name : Start NuoDB test database
115+ command : ls -las && env && make up
116+ - run :
117+ name : Run tests
118+ command : |
119+ sudo timedatectl set-timezone America/New_York
120+ export PATH="$PATH:$HOME/.dotnet/tools"
121+ dotCover dotnet \
122+ --Output="test-results/unit-tests-coverage.html" \
123+ --ReportType="HTML" \
124+ --Filters="-:module=Humanizer;-:module=NUnitTestProjectCore;-:type=JetBrains.*;-:type=System.*;-:type=Microsoft.*" -- test \
125+ NUnitTestProjectCore/NUnitTestProjectCore.csproj \
126+ --logger="junit;LogFilePath=./TestResults/unit-tests.xml"
127+ - run :
128+ name : Make sure we clean the test environment
129+ command : make dn
130+ - store_artifacts :
131+ path : test-results
132+ destination : coverage-report
133+ - store_test_results :
134+ path : NUnitTestProjectCore/TestResults
135+
88136workflows :
89137 # Workflow for commits - only build and test
90138 build-and-test :
@@ -93,3 +141,6 @@ workflows:
93141 context :
94142 - common-config
95143 - build-test-windows
144+ - unit-tests-linux :
145+ context :
146+ - common-config
0 commit comments