Run Build and Unit tests #131
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@v2 | |
- name: Set up .NET 6.0 SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.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 |