45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
name: Run tests
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
target:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
run-tests:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout branch
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.target }}
|
|
submodules: recursive
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: |
|
|
8.0.x
|
|
|
|
- name: Initialize environment
|
|
run: |
|
|
mkdir -p ~/".local/share/Daedalic Entertainment GmbH/Barotrauma"
|
|
|
|
- name: Run tests
|
|
continue-on-error: true
|
|
run: |
|
|
set +e
|
|
dotnet test LinuxSolution.sln -clp:"ErrorsOnly;Summary" --logger "trx;LogFileName=$PWD/test-results.trx"
|
|
echo "EXITCODE=$?" >> "$GITHUB_ENV"
|
|
|
|
- name: Upload test results
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: test-results
|
|
path: test-results.trx
|
|
|
|
- name: Set exit code
|
|
run: exit "$EXITCODE"
|