Unit test matrix
This commit is contained in:
parent
169dfa405b
commit
2dd3d905b3
|
@ -4,6 +4,9 @@ name: Run test on DLLs matching the specified pattern
|
||||||
description: Runs unit/integration tests
|
description: Runs unit/integration tests
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
|
platform:
|
||||||
|
description: 'OS platform that the tests are running on'
|
||||||
|
required: true
|
||||||
artifact:
|
artifact:
|
||||||
description: 'Test binary artifact'
|
description: 'Test binary artifact'
|
||||||
required: true
|
required: true
|
||||||
|
@ -26,11 +29,8 @@ runs:
|
||||||
name: ${{ inputs.artifact }}
|
name: ${{ inputs.artifact }}
|
||||||
path: _tests
|
path: _tests
|
||||||
|
|
||||||
- name: List all files
|
|
||||||
shell: bash
|
|
||||||
run: ls -la ./_tests
|
|
||||||
|
|
||||||
- name: Make executable
|
- name: Make executable
|
||||||
|
if: ${{ inputs.platform }}
|
||||||
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
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
runtime: osx-x64
|
runtime: osx-x64
|
||||||
|
|
||||||
# Build Artifacts
|
# Build Artifact (since GitHub limits the number of artifacts)
|
||||||
|
|
||||||
- name: Publish Backend Artifact
|
- name: Publish Backend Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
@ -68,14 +68,6 @@ jobs:
|
||||||
name: backend
|
name: backend
|
||||||
path: _artifacts/**/*
|
path: _artifacts/**/*
|
||||||
|
|
||||||
# Distribution Artifact
|
|
||||||
|
|
||||||
# - name: Publish Distribution Artifact
|
|
||||||
# uses: actions/upload-artifact@v4
|
|
||||||
# with:
|
|
||||||
# name: distribution
|
|
||||||
# path: distribution/**/*
|
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -103,9 +95,22 @@ jobs:
|
||||||
name: ui
|
name: ui
|
||||||
path: _output/UI/**/*
|
path: _output/UI/**/*
|
||||||
|
|
||||||
unit_test_linux:
|
unit_test:
|
||||||
needs: backend
|
needs: backend
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
artifact: tests-linux-x64
|
||||||
|
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest
|
||||||
|
- os: macos-latest
|
||||||
|
artifact: tests-osx-x64
|
||||||
|
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest
|
||||||
|
- os: windows-latest
|
||||||
|
artifact: tests-win-x64
|
||||||
|
filter: TestCategory!=ManualTest&TestCategory!=LINUX&TestCategory!=IntegrationTest&TestCategory!=AutomationTest
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out
|
- name: Check out
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -113,6 +118,7 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: ./.github/actions/test
|
uses: ./.github/actions/test
|
||||||
with:
|
with:
|
||||||
artifact: tests-linux-x64
|
platform: ${{ matrix.os }}
|
||||||
|
artifact: ${{ matrix.artifact }}
|
||||||
pattern: Sonarr.*.Test.dll
|
pattern: Sonarr.*.Test.dll
|
||||||
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest
|
filter: ${{ matrix.filter }}
|
||||||
|
|
Loading…
Reference in New Issue