Update tests.yml #27
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: Compile Projects | |
on: | |
push: | |
branches: | |
- stable | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
tests: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_NOLOGO: true | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout | |
- uses: actions/setup-dotnet@v3 | |
name: Setup .NET SDK | |
with: | |
global-json-file: global.json | |
- name: Restore Dependencies | |
run: dotnet restore | |
- uses: chickensoft-games/setup-godot@v1 | |
name: Setup Godot | |
with: | |
version: 4.3.0 | |
use-dotnet: true | |
include-templates: false | |
- name: Verify Setup | |
run: | | |
dotnet --version | |
godot --version | |
- name: Build Projects | |
run: dotnet build | |
- name: Run Unit Tests | |
run: dotnet test ./Nindot.Tests/Nindot.Tests.csproj --configuration Debug --no-build --logger "trx;LogFileName=Tests-${{ matrix.os }}.trx" | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Tests-${{ matrix.os }} | |
path: ./Nindot.Tests/TestResults/Tests-${{ matrix.os }}.trx |