mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-19 21:46:43 -04:00
Test versions 16 and 17 of Postgres
This commit is contained in:
@@ -4,6 +4,8 @@ description: Runs unit/integration tests
|
|||||||
inputs:
|
inputs:
|
||||||
use_postgres:
|
use_postgres:
|
||||||
description: 'Whether postgres should be used for the database'
|
description: 'Whether postgres should be used for the database'
|
||||||
|
postgres-version:
|
||||||
|
description: 'Which postgres version should be used for the database'
|
||||||
os:
|
os:
|
||||||
description: 'OS that the tests are running on'
|
description: 'OS that the tests are running on'
|
||||||
required: true
|
required: true
|
||||||
@@ -31,12 +33,14 @@ runs:
|
|||||||
|
|
||||||
- name: Setup Postgres
|
- name: Setup Postgres
|
||||||
if: ${{ inputs.use_postgres }}
|
if: ${{ inputs.use_postgres }}
|
||||||
uses: ikalnytskyi/action-setup-postgres@v4
|
uses: ikalnytskyi/action-setup-postgres@v7
|
||||||
|
with:
|
||||||
|
postgres-version: ${{ inputs.postgres-version }}
|
||||||
|
|
||||||
- name: Setup Test Variables
|
- name: Setup Test Variables
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "RESULTS_NAME=${{ inputs.integration_tests && 'integation-' || 'unit-' }}${{ inputs.artifact }}${{ inputs.use_postgres && '-postgres' }}" >> "$GITHUB_ENV"
|
echo "RESULTS_NAME=${{ inputs.integration_tests && 'integation-' || 'unit-' }}${{ inputs.artifact }}${{ inputs.use_postgres && '-postgres' }}${{ inputs.use_postgres && inputs.postgres-version && inputs.postgres-version }}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Setup Postgres Environment Variables
|
- name: Setup Postgres Environment Variables
|
||||||
if: ${{ inputs.use_postgres }}
|
if: ${{ inputs.use_postgres }}
|
||||||
|
|||||||
@@ -152,6 +152,10 @@ jobs:
|
|||||||
unit_test_postgres:
|
unit_test_postgres:
|
||||||
needs: backend
|
needs: backend
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
postgres-version: [16, 17]
|
||||||
steps:
|
steps:
|
||||||
- name: Check out
|
- name: Check out
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -164,6 +168,7 @@ 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
|
||||||
|
postgres-version: ${{ matrix.postgres-version }}
|
||||||
|
|
||||||
integration_test:
|
integration_test:
|
||||||
needs: [prepare, backend]
|
needs: [prepare, backend]
|
||||||
|
|||||||
Reference in New Issue
Block a user