Version 1.0.3.0 #24
Workflow file for this run
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: Unit Tests | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test-pulse: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
configuration: [Debug, Release] | |
env: | |
# Define the path to project and test project | |
PROJECT: src/Pulse/Pulse.csproj | |
TEST_PROJECT: tests/Pulse.Tests.Unit/Pulse.Tests.Unit.csproj | |
steps: | |
# 1. Checkout the repository code | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
# 2. Cache NuGet packages | |
- name: Cache NuGet Packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
# 3. Setup .NET | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
# 4. Clean | |
- name: Clean | |
run: | | |
dotnet clean ${{ env.PROJECT }} -c ${{ matrix.configuration }} | |
dotnet clean ${{ env.TEST_PROJECT }} -c ${{ matrix.configuration }} | |
# 5. Run Unit Tests | |
- name: Run Unit Tests | |
run: dotnet test ${{ env.TEST_PROJECT }} -c ${{ matrix.configuration }} |