Integration Tests
This commit is contained in:
parent
e4a46d4a33
commit
91661b7a72
|
@ -18,6 +18,10 @@ inputs:
|
||||||
filter:
|
filter:
|
||||||
description: 'Filter for tests'
|
description: 'Filter for tests'
|
||||||
required: true
|
required: true
|
||||||
|
binary_artifact:
|
||||||
|
description: 'Binary artifact for integration tests'
|
||||||
|
binary_path:
|
||||||
|
description: 'Path witin binary artifact for integration tests'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
|
@ -44,11 +48,28 @@ runs:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
path: _tests
|
path: _tests
|
||||||
|
|
||||||
|
- name: Download Binary Artifact
|
||||||
|
if: ${{ inputs.binary_artifact }}
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.binary_artifact }}
|
||||||
|
path: _artifacts
|
||||||
|
|
||||||
|
- name: Set up binary artifact
|
||||||
|
if: ${{ inputs.binary_path }}
|
||||||
|
shell: bash
|
||||||
|
run: mv ${{inputs.binary_path}} _tests/bin
|
||||||
|
|
||||||
- name: Make executable
|
- name: Make executable
|
||||||
if: startsWith(inputs.platform, 'windows') != true
|
if: startsWith(inputs.platform, 'windows') != true
|
||||||
shell: bash
|
shell: bash
|
||||||
run: chmod +x ./_tests/Sonarr.Test.Dummy && chmod +x ./_tests/ffprobe
|
run: chmod +x ./_tests/Sonarr.Test.Dummy && chmod +x ./_tests/ffprobe
|
||||||
|
|
||||||
|
- name: Make Sonarr binary executable
|
||||||
|
if: ${{ inputs.binary_path }} && startsWith(inputs.platform, 'windows') != true
|
||||||
|
shell: bash
|
||||||
|
run: chmod +x ./_tests/bin/Sonarr
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: bash
|
shell: bash
|
||||||
run: dotnet test ./_tests/Sonarr.*.Test.dll --filter "${{ inputs.filter }}" --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
|
run: dotnet test ./_tests/Sonarr.*.Test.dll --filter "${{ inputs.filter }}" --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
|
||||||
|
|
|
@ -153,3 +153,38 @@ jobs:
|
||||||
pattern: Sonarr.*.Test.dll
|
pattern: Sonarr.*.Test.dll
|
||||||
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest
|
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest
|
||||||
use_postgres: true
|
use_postgres: true
|
||||||
|
|
||||||
|
integration_test:
|
||||||
|
needs: backend
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
artifact: tests-linux-x64
|
||||||
|
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory=IntegrationTest
|
||||||
|
binary_artifact: linux
|
||||||
|
binary_path: linux-x64/net6.0/Sonarr
|
||||||
|
- os: macos-latest
|
||||||
|
artifact: tests-osx-x64
|
||||||
|
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory=IntegrationTest
|
||||||
|
binary_artifact: macos
|
||||||
|
binary_path: osx-x64/net6.0/Sonarr
|
||||||
|
- os: windows-latest
|
||||||
|
artifact: tests-win-x64
|
||||||
|
filter: TestCategory!=ManualTest&TestCategory=WINDOWS&TestCategory=IntegrationTest
|
||||||
|
binary_artifact: windows
|
||||||
|
binary_path: win-x64/net6.0/Sonarr
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Check out
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
uses: ./.github/actions/test
|
||||||
|
with:
|
||||||
|
platform: ${{ matrix.os }}
|
||||||
|
artifact: ${{ matrix.artifact }}
|
||||||
|
pattern: Sonarr.*.Test.dll
|
||||||
|
filter: ${{ matrix.filter }}
|
||||||
|
binary_artifact:
|
||||||
|
|
Loading…
Reference in New Issue