DotRecastNetSim/.github/workflows/dotnet.yml

50 lines
1.1 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'
- 'pr/**'
2023-11-07 16:49:22 +03:00
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
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-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:
2023-10-28 06:34:18 +03:00
dotnet-version: [ '6.0.x', '7.0.x' ]
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-09-18 17:10:20 +03:00
- uses: actions/checkout@v3
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:
dotnet-version: ${{ matrix.dotnet-version }}
2023-09-18 17:11:56 +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
2023-09-18 17:17:54 +03:00
run: dotnet build -c Release --no-restore
2023-09-18 17:11:56 +03:00
2023-09-18 17:10:20 +03:00
- name: Test
2023-09-18 17:17:54 +03:00
run: dotnet test -c Release --no-build --verbosity normal