DotRecastNetSim/.github/workflows/dotnet.yml

54 lines
1.3 KiB
YAML
Raw Normal View History

2023-04-18 17:02:42 +03:00
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
2023-11-07 16:49:22 +03:00
branches:
2023-11-09 15:57:08 +03:00
- 'main'
2023-11-11 07:14:46 +03:00
- 'pr/**'
2023-11-07 16:49:22 +03:00
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
2023-11-16 08:05:19 +03:00
- '**.yml'
2023-04-18 17:02:42 +03:00
pull_request:
2023-11-07 16:49:22 +03:00
branches:
- 'pr/**'
2023-09-18 17:10:20 +03:00
paths:
2023-11-07 16:49:22 +03:00
- '**.cs'
- '**.csproj'
- '**.sln'
2023-11-16 08:05:19 +03:00
- '**.yml'
2023-04-18 17:02:42 +03:00
jobs:
2023-09-18 17:10:20 +03:00
build-and-test:
2023-10-28 06:40:54 +03:00
name: test-${{matrix.os}}-${{matrix.dotnet-version}}
2023-09-18 17:10:20 +03:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
dotnet-version: [ '6', '7', '8' ]
2023-09-18 17:10:20 +03:00
os: [ windows-latest, ubuntu-latest, macos-latest ]
2023-04-18 17:02:42 +03:00
steps:
2023-11-21 17:53:18 +03:00
- uses: actions/checkout@v4
2023-10-03 09:42:01 +03:00
with:
fetch-depth: 0 # Get all history to allow automatic versioning using MinVer
2023-09-18 17:10:20 +03:00
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
2024-01-21 14:22:20 +03:00
dotnet-version: ${{ matrix.dotnet-version }}.x
2023-11-16 08:05:19 +03:00
2023-09-18 17:10:20 +03:00
- name: Restore dependencies
run: dotnet restore
2023-09-18 17:11:56 +03:00
2023-09-18 17:10:20 +03:00
- name: Build
2024-04-24 18:02:27 +03:00
run: |
dotnet restore
dotnet build -c Release --no-restore --framework net${{ matrix.dotnet-version }}.0
2023-09-18 17:11:56 +03:00
2023-09-18 17:10:20 +03:00
- name: Test
2024-01-21 14:22:20 +03:00
run: dotnet test -c Release --no-build --verbosity normal --framework net${{ matrix.dotnet-version }}.0