Run Build and Unit tests #226
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 Build and Unit tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
main: | |
runs-on: ${{ matrix.environment }} | |
strategy: | |
matrix: | |
environment: | |
# TODO[#4]: Support platforms other than Windows. | |
# - macos-latest | |
# - ubuntu-latest | |
- windows-latest | |
env: | |
DOTNET_NOLOGO: 1 | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
steps: | |
- name: Fetch the sources | |
uses: actions/checkout@v4 | |
- name: Set up .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
6.0.x | |
8.0.x | |
- name: Build NuGet packages | |
shell: pwsh | |
run: ./scripts/build-packages.ps1 | |
- name: Restore Nuget packages | |
run: dotnet restore | |
- name: Build the project | |
run: dotnet build | |
- name: Unit tests | |
run: dotnet test PascalABC.NET.SDK.UnitTests | |
- name: Integration tests | |
run: dotnet test PascalABC.NET.SDK.IntegrationTests |