Skip to content

Add end to end tests project and action #8

Add end to end tests project and action

Add end to end tests project and action #8

Workflow file for this run

name: Api Unit Tests
on:
pull_request:
branches: [ "main" ]
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: [ '9.x' ]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test tests/Api.UnitTests --no-build --verbosity normal --logger trx --results-directory "ApiUnitTestResults-${{ matrix.dotnet-version }}"
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: api-unit-test-results-${{ matrix.dotnet-version }}
path: ApiUnitTestResults-${{ matrix.dotnet-version }}
if: ${{ always() }}