Skip to content

test

test #3

Workflow file for this run

name: .NET API Tests & Build

Check failure on line 1 in .github/workflows/dotnet.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/dotnet.yml

Invalid workflow file

(Line: 16, Col: 29): Unexpected value 'true'
on:
push:
branches: [ Prod, Dev ]
pull_request:
branches: [ Prod, Dev ]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['10.0.x']
include-prerelease: true
steps:
- uses: actions/checkout@v4
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: |
dotnet restore TableMasterApi/TableMasterApi.csproj
dotnet restore TableMasterApi.Tests/TableMasterApi.Tests.csproj
- name: Build
run: |
dotnet build TableMasterApi/TableMasterApi.csproj --no-restore --configuration Release
dotnet build TableMasterApi.Tests/TableMasterApi.Tests.csproj --no-restore --configuration Release
- name: Run Unit Tests
run: dotnet test TableMasterApi.Tests/TableMasterApi.Tests.csproj --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/test-results.trx'
# On publie uniquement l'API
- name: Publish API
run: dotnet publish TableMasterApi/TableMasterApi.csproj -c Release -o ./publish --no-build
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: api-build
path: ./publish/
- name: Test Report
if: always()
uses: dorny/test-reporter@v1
with:
name: .NET Test Results
path: '**/test-results.trx'
reporter: 'dotnet-trx'