Skip to content

Commit

Permalink
deps: update postgres docker tag to v17 (#2382)
Browse files Browse the repository at this point in the history
* deps: update postgres docker tag to v17

* deps: also update clients to 17

* fix: update expected output to match v17

* build: add pg repository

* build: update .net to 8.0

* fix: also update samples to .net 8

---------

Co-authored-by: Knut Olav Løite <[email protected]>
  • Loading branch information
renovate-bot and olavloite authored Dec 19, 2024
1 parent 9dac4b4 commit e05abb4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/integration-emulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# Add a PostgreSQL Docker container and the emulator.
services:
postgres:
image: postgres:14
image: postgres:17
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
Expand Down Expand Up @@ -63,8 +63,10 @@ jobs:
bundler-cache: true
- name: Setup psql
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install --yes --no-install-recommends postgresql-client-14
sudo apt-get install --yes --no-install-recommends postgresql-client-17
- name: Create PostgreSQL test database
run: |
psql -h /pg -U postgres -c "CREATE DATABASE pgadapter"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
services:
# Container label
postgres:
image: postgres:14
image: postgres:17
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
Expand Down Expand Up @@ -105,8 +105,10 @@ jobs:
bundler-cache: true
- name: Setup psql
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install --yes --no-install-recommends postgresql-client-14
sudo apt-get install --yes --no-install-recommends postgresql-client-17
- name: Create PostgreSQL test database
run: |
psql -h /pg -U postgres -c "CREATE DATABASE pgadapter"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
- name: Run npgsql Sample tests
working-directory: ./samples/dotnet/npgsql-sample
run: dotnet run Program.cs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install postgresql-client-14"
- name: "Install postgresql-client-17"
run: |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-client-14
sudo apt-get install postgresql-client-17
- name: Run psql snippets
working-directory: ./samples/snippets/psql-snippets/tests
run: ./test_samples.sh
Expand Down
2 changes: 1 addition & 1 deletion samples/dotnet/npgsql-sample/npgsql-sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>npgsql_sample</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
5 changes: 4 additions & 1 deletion samples/snippets/psql-snippets/tests/test_samples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ if [ "$MESSAGE" == "" ]; then
4 records inserted'
fi
if [ "$MESSAGE" == "" ]; then
source ./test_sample.sh write_data_with_dml_batch $'PREPARE\nINSERT 0 1
source ./test_sample.sh write_data_with_dml_batch $'PREPARE
INSERT 0 1
INSERT 0 1
INSERT 0 1
3 records inserted'
fi
if [ "$MESSAGE" == "" ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
Expand Down

0 comments on commit e05abb4

Please sign in to comment.