Build and Test validation #8
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 validation | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
DOTNETVERSION: 7.0.x | |
jobs: | |
build: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Setup .NET SDK ${{env.DOTNETVERSION}} | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '${{env.DOTNETVERSION}}' | |
- name: List installed .NET info | |
shell: pwsh | |
run: dotnet --info | |
- name: Install .NET MAUI | |
shell: bash | |
run: | | |
dotnet nuget locals all --clear | |
dotnet workload install maui --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json --source https://api.nuget.org/v3/index.json | |
dotnet workload install android ios maccatalyst tvos macos maui wasm-tools --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json --source https://api.nuget.org/v3/index.json | |
- name: Restore nuget packages | |
run: dotnet restore ManageMint.sln | |
# https://docs.microsoft.com/en-us/dotnet/maui/macos/deployment/overview | |
- name : Build MacCatalyst App | |
shell: bash | |
run: | | |
dotnet build -f net7.0-maccatalyst -c Release -o ./artifacts | |
dotnet publish -f net7.0-maccatalyst -c Release -p:BuildIpa=True -o ./artifacts | |
- name: Build and Run UnitTests | |
shell: bash | |
run: | | |
dotnet build test/ManageMint.UnitTests/ManageMint.UnitTests.csproj | |
dotnet test test/ManageMint.UnitTests/ManageMint.UnitTests.csproj --no-build --verbosity normal | |
# - name: Restore workloads | |
# run: dotnet workload restore | |
# | |
# - name: Restore dependencies | |
# run: dotnet restore | |
# | |
# - name: Build | |
# run: dotnet build --no-restore | |
# | |
# - name: Test | |
# run: dotnet test |