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: Run Subproject Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout Repository | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
# Step 2: Set up .NET | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0' | |
# Step 3: Restore Dependencies for Test Subproject | |
- name: Restore Dependencies | |
run: dotnet restore ./Bank/Test/Test.csproj | |
# Step 4: Clean Build | |
- name: Clean Build | |
run: dotnet clean ./Bank/Test/Test.csproj | |
# Step 5: Build Test Subproject | |
- name: Build Tests | |
run: dotnet build ./Bank/Test/Test.csproj --configuration Release | |
# Step 6: Run Tests with Coverage | |
- name: Run Tests with Coverage | |
run: dotnet test ./Bank/Test/Test.csproj --configuration Release --no-build --collect:"XPlat Code Coverage" --verbosity normal |