Skip to content

ci: fix dotnet test command in workflow #3

ci: fix dotnet test command in workflow

ci: fix dotnet test command in workflow #3

Workflow file for this run

name: unit tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Determine ReasnAPI solution filename
run: echo SOLUTION_FILE=$(realpath ./Server/ReasnAPI/ReasnAPI.sln) >> $GITHUB_ENV
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore ${{ env.SOLUTION_FILE }}
- name: Test with dotnet
run: dotnet test ${{ env.SOLUTION_FILE }} --logger trx --logger html --results-directory "TestResults-${{ github.sha }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results-${{ github.sha }}
path: TestResults-${{ github.sha }}
retention-days: 14
if: ${{ always() }}