Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 63 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,75 @@ jobs:
run: dotnet restore Monai.Deploy.WorkflowManager.sln
working-directory: ./src

- name: Run Unit Test
run: ./run-tests.sh
- name: Build Solution
run: dotnet build -c Release --nologo --no-restore Monai.Deploy.WorkflowManager.sln
working-directory: ./src

- name: Run Unit Test
run: |
find ~+ -type f -name "*.Tests.csproj" | \
xargs -L1 dotnet test -v=minimal --results-directory "./results" \
--collect:"XPlat Code Coverage" --settings "./coverlet.runsettings"
working-directory: ./tests

- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-reports
path: ./src/results/**/coverage.opencover.xml
path: ./tests/**/coverage.opencover.xml

integration-tests:
runs-on: ubuntu-latest
services:
mongo:
image: mongo
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
ports:
- 27017:27017

rabbit:
image: rabbitmq:3.8.18-management
env:
RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG"
RABBITMQ_DEFAULT_USER: "admin"
RABBITMQ_DEFAULT_PASS: "admin"
RABBITMQ_DEFAULT_VHOST: "monaideploy"
ports:
- "15672:15672"
- "5672:5672"

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install Dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Enable NuGet cache
uses: actions/[email protected]
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget

- name: Restore Solution
run: dotnet restore Monai.Deploy.WorkflowManager.sln
working-directory: ./src

- name: Build Solution
run: dotnet build -c Release --nologo --no-restore Monai.Deploy.WorkflowManager.sln
working-directory: ./src

- name: Run Integration Tests
run: find ~+ -type f -name "*.IntegrationTests.csproj" | xargs -L1 dotnet test
working-directory: ./tests

sonarscanner:
runs-on: ubuntu-latest
Expand Down
Loading