Merge pull request #39 from Team-MPM/dev #72
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: Build and Test .NET Projects | |
on: | |
push: | |
branches: [ "master", "dev" ] | |
pull_request: | |
branches: [ "master", "dev" ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Azure Functions Core Tools | |
run: npm install -g azure-functions-core-tools@3 --unsafe-perm true | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0 | |
- name: Restore Workloads | |
run: dotnet workload restore | |
- name: Restore Dependencies | |
run: | | |
dotnet restore ./MPM-Betting.Api/MPM-Betting.Api.csproj | |
dotnet restore ./MPM-Betting.Blazor/MPM-Betting.Blazor.csproj | |
dotnet restore ./MPM-Betting.Blazor.Components/MPM-Betting.Blazor.Components.csproj | |
dotnet restore ./MPM-Betting.DataModel/MPM-Betting.DataModel.csproj | |
dotnet restore ./MPM-Betting.Functions/MPM-Betting.Functions.csproj | |
dotnet restore ./MPM-Betting.Scraper/MPM-Betting.Scraper.csproj | |
dotnet restore ./MPM-Betting.Services/MPM-Betting.Services.csproj | |
dotnet restore ./MPM-Betting.UnitTests/MPM-Betting.UnitTests.csproj | |
dotnet restore ./MPM-Betting.IntegrationTests/MPM-Betting.IntegrationTests.csproj | |
dotnet restore ./MPM-Betting.Aspire/MPM-Betting.Aspire.AppHost/MPM-Betting.Aspire.AppHost.csproj | |
dotnet restore ./MPM-Betting.Aspire/MPM-Betting.Aspire.ServiceDefaults/MPM-Betting.Aspire.ServiceDefaults.csproj | |
- name: Build | |
run: | | |
dotnet build --no-restore ./MPM-Betting.Api/MPM-Betting.Api.csproj | |
dotnet build --no-restore ./MPM-Betting.Blazor/MPM-Betting.Blazor.csproj | |
dotnet build --no-restore ./MPM-Betting.Blazor.Components/MPM-Betting.Blazor.Components.csproj | |
dotnet build --no-restore ./MPM-Betting.DataModel/MPM-Betting.DataModel.csproj | |
dotnet build --no-restore ./MPM-Betting.Functions/MPM-Betting.Functions.csproj | |
dotnet build --no-restore ./MPM-Betting.Scraper/MPM-Betting.Scraper.csproj | |
dotnet build --no-restore ./MPM-Betting.Services/MPM-Betting.Services.csproj | |
dotnet build --no-restore ./MPM-Betting.UnitTests/MPM-Betting.UnitTests.csproj | |
dotnet build --no-restore ./MPM-Betting.IntegrationTests/MPM-Betting.IntegrationTests.csproj | |
dotnet build --no-restore ./MPM-Betting.Aspire/MPM-Betting.Aspire.AppHost/MPM-Betting.Aspire.AppHost.csproj | |
dotnet build --no-restore ./MPM-Betting.Aspire/MPM-Betting.Aspire.ServiceDefaults/MPM-Betting.Aspire.ServiceDefaults.csproj | |
- name: Unit Test | |
run: dotnet test --no-build --verbosity normal ./MPM-Betting.UnitTests/MPM-Betting.UnitTests.csproj | |
- name: Integration Test | |
run: dotnet test --no-build --verbosity normal ./MPM-Betting.IntegrationTests/MPM-Betting.IntegrationTests.csproj |