name: _test run-name: Test ${{ inputs.project-name }} on: workflow_call: inputs: project-name: type: string required: true project-path: type: string required: true jobs: testing: name: Test runs-on: ubuntu-22.04 permissions: checks: write contents: read pull-requests: write steps: - name: Check out repo uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 - name: Set up .NET uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 - name: Cache NuGet packages uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} restore-keys: | ${{ runner.os }}-nuget- - name: Install dependencies run: dotnet restore --locked-mode ${{ inputs.project-path }}/${{ inputs.project-name }}.csproj - name: Build run: dotnet build --verbosity minimal ${{ inputs.project-path }}/${{ inputs.project-name }}.csproj - name: Test run: dotnet test ${{ inputs.project-path }}/${{ inputs.project-name }}.csproj --no-build --logger "trx;LogFileName=mothership-test-results.trx"