Skip to content

Commit 43f724d

Browse files
Add new unit tests to CircleCI and other small fixes (#51)
* [DOTNET-7] Add test-results directory to gitignore list * [DOTNET-8] Add new unit tests to CircleCI * [DOTNET-9] Change the license name in the README.md file
1 parent 7c362f9 commit 43f724d

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

.circleci/config.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,54 @@ jobs:
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+
88136
workflows:
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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
test-results/
12
TestResults
23
TestResult.xml
34
bin

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ The CircleCI file contains the complete and tested build process for Linux envir
2525

2626
License
2727
-------------------
28-
[NuoDB License](https://github.com/nuodb/nuodb-dotnet/blob/master/LICENSE.txt)
28+
[BSD-3-Clause](https://github.com/nuodb/nuodb-dotnet/blob/master/LICENSE.txt)

0 commit comments

Comments
 (0)