Postgres tests on ubuntu maybe
This commit is contained in:
parent
8bbacc48e2
commit
b0fce7d6d6
|
@ -4,6 +4,8 @@ name: Run test on DLLs matching the specified pattern
|
||||||
description: Runs unit/integration tests
|
description: Runs unit/integration tests
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
|
use_postgres:
|
||||||
|
description: 'Whether postgres should be used for the database'
|
||||||
platform:
|
platform:
|
||||||
description: 'OS platform that the tests are running on'
|
description: 'OS platform that the tests are running on'
|
||||||
required: true
|
required: true
|
||||||
|
@ -23,6 +25,19 @@ runs:
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
|
|
||||||
|
- name: Setup Postgres
|
||||||
|
if: ${{ inputs.use_postgres }}
|
||||||
|
uses: ikalnytskyi/action-setup-postgres@v4
|
||||||
|
|
||||||
|
- name: Setup Environment Variables
|
||||||
|
if: ${{ inputs.use_postgres }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "Sonarr__Postgres__Host=localhost" >> "$GITHUB_ENV"
|
||||||
|
echo "Sonarr__Postgres__Port=5432" >> "$GITHUB_ENV"
|
||||||
|
echo "Sonarr__Postgres__User=postgres" >> "$GITHUB_ENV"
|
||||||
|
echo "Sonarr__Postgres__Password=postgres" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Download Artifact
|
- name: Download Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -122,3 +122,19 @@ jobs:
|
||||||
artifact: ${{ matrix.artifact }}
|
artifact: ${{ matrix.artifact }}
|
||||||
pattern: Sonarr.*.Test.dll
|
pattern: Sonarr.*.Test.dll
|
||||||
filter: ${{ matrix.filter }}
|
filter: ${{ matrix.filter }}
|
||||||
|
|
||||||
|
unit_test_postgres:
|
||||||
|
needs: backend
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
uses: ./.github/actions/test
|
||||||
|
with:
|
||||||
|
platform: ubuntu-latest
|
||||||
|
artifact: tests-linux-x64
|
||||||
|
pattern: Sonarr.*.Test.dll
|
||||||
|
filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest
|
||||||
|
use_postgres: true
|
||||||
|
|
Loading…
Reference in New Issue