From ce4c2e4fcc94cf20bf0ebfba81ae1766e422af9b Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 22 Sep 2025 17:10:27 +0300 Subject: [PATCH] Test versions 16 and 17 of Postgres --- .github/actions/test/action.yml | 8 ++++++-- .github/workflows/build_v5.yml | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index bd62f4830..50e0b8db1 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -4,6 +4,8 @@ description: Runs unit/integration tests inputs: use_postgres: description: 'Whether postgres should be used for the database' + postgres-version: + description: 'Which postgres version should be used for the database' os: description: 'OS that the tests are running on' required: true @@ -31,12 +33,14 @@ runs: - name: Setup 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 shell: bash 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 if: ${{ inputs.use_postgres }} diff --git a/.github/workflows/build_v5.yml b/.github/workflows/build_v5.yml index 14803eca8..8f418901e 100644 --- a/.github/workflows/build_v5.yml +++ b/.github/workflows/build_v5.yml @@ -152,6 +152,10 @@ jobs: unit_test_postgres: needs: backend runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + postgres-version: [16, 17] steps: - name: Check out uses: actions/checkout@v4 @@ -164,6 +168,7 @@ jobs: pattern: Sonarr.*.Test.dll filter: TestCategory!=ManualTest&TestCategory!=WINDOWS&TestCategory!=IntegrationTest&TestCategory!=AutomationTest use_postgres: true + postgres-version: ${{ matrix.postgres-version }} integration_test: needs: [prepare, backend]