42 lines
995 B
YAML
42 lines
995 B
YAML
name: Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- dev
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
test:
|
|
name: Run Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '9.0.x'
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore --verbosity normal
|
|
|
|
- name: Build
|
|
run: dotnet build --configuration Release --no-restore --verbosity normal
|
|
|
|
- name: Run tests
|
|
run: dotnet test --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
|
|
|
|
- name: Test Summary
|
|
if: always()
|
|
run: |
|
|
if [ -f "**/test-results.trx" ]; then
|
|
echo "✅ Tests completed"
|
|
else
|
|
echo "❌ Test results not found"
|
|
fi
|