This commit is contained in:
Mark McDowall 2023-12-24 20:06:51 -08:00
parent c149c3f46f
commit 54fd6aaeb5
2 changed files with 31 additions and 2 deletions

25
.github/actions/test/action.yml vendored Normal file
View File

@ -0,0 +1,25 @@
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
name: Run test on DLLs matching the specified pattern
description: Runs unit/integration tests
inputs:
pattern:
description: 'Pattern for DLLs'
required: true
filter:
description: 'Filter for tests'
required: true
runs:
using: 'composite'
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Run tests
shell: bash
runs: |
for i in tests/${{ inputs.pattern }}; do
dotnet test $i --no-build -c Release --filter ${{ inputs.filter }}
done

View File

@ -123,6 +123,10 @@ jobs:
uses: actions/download-artifact@v4
with:
name: tests-linux-x64
path: tests
- name: Display structure of downloaded files
run: ls -R
- name: Test
uses: ./.github/actions/test
with:
pattern: Sonarr.*.Test.dll
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest