Skip to content

Commit

Permalink
Split CI unit tests by project
Browse files Browse the repository at this point in the history
Should make logs easier to read
  • Loading branch information
JoshKeegan committed Nov 8, 2024
1 parent d4ce3af commit 91b0fa0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,21 @@ jobs:
working-directory: build
run: make build

- name: Run Unit Tests
- name: Run Unit Tests (Main)
working-directory: build
run: make unit-tests-run
run: make unit-tests-run-main

- name: Run Unit Tests (Single Threaded)
working-directory: build
run: make unit-tests-run-single-threaded

- name: Run Unit Tests (SpecFlow)
working-directory: build
run: make unit-tests-run-specflow

- name: Run Unit Tests (Reqnroll)
working-directory: build
run: make unit-tests-run-reqnroll

- name: Create Nuget Packages
working-directory: build
Expand Down
15 changes: 12 additions & 3 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,27 @@ build: clean
dotnet build -c Release --no-restore

.PHONY: unit-tests-run
unit-tests-run:
unit-tests-run: unit-tests-run-main unit-tests-run-single-threaded unit-tests-run-specflow unit-tests-run-reqnroll

.PHONY: unit-tests-run-main
unit-tests-run-main:
cd ../test/UnitTests && \
dotnet test --no-build -c Release --logger:trx\;logfilename=../../../artefacts/testResults/UnitTests.trx

.PHONY: unit-tests-run-single-threaded
unit-tests-run-single-threaded:
# Run the single threaded tests with a timeout, as they test deadlock scenarios which would never return if failing
# You can tell if this times out as it returns exit code 124, which make prints as "Error 124"
cd ../test/UnitTests.SingleThreaded && \
timeout 10 dotnet test --no-build -c Release --logger:trx\;logfilename=../../../artefacts/testResults/UnitTests.SingleThreaded.trx


.PHONY: unit-tests-run-specflow
unit-tests-run-specflow:
cd ../test/UnitTests.SpecFlow && \
dotnet test --no-build -c Release --logger:trx\;logfilename=../../../artefacts/testResults/UnitTests.SpecFlow.trx


.PHONY: unit-tests-run-reqnroll
unit-tests-run-reqnroll:
cd ../test/UnitTests.Reqnroll && \
dotnet test --no-build -c Release --logger:trx\;logfilename=../../../artefacts/testResults/UnitTests.Reqnroll.trx

Expand Down

0 comments on commit 91b0fa0

Please sign in to comment.