Skip to content

Commit c9c6212

Browse files
authored
Use withTransaction from PostgresNIO (#11)
* Use withTransaction from postgresNIO * Update CI * Add docker compose file for testing * Add postgres:17 to CI * Add postgres-auth for postgres:17
1 parent 366fd33 commit c9c6212

File tree

4 files changed

+25
-41
lines changed

4 files changed

+25
-41
lines changed

.github/workflows/ci.yml

+10-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ on:
44
push:
55
branches:
66
- main
7-
- 2.x.x
87
paths:
98
- '**.swift'
109
- '**.yml'
1110
pull_request:
12-
branches:
13-
- main
14-
- 2.x.x
1511
workflow_dispatch:
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}-ci
14+
cancel-in-progress: true
1615

1716
jobs:
1817
linux:
@@ -23,17 +22,18 @@ jobs:
2322
image:
2423
- 'swift:5.9'
2524
- 'swift:5.10'
25+
- 'swift:6.0'
2626
postgres-image:
27+
- 'postgres:17'
2728
- 'postgres:16'
2829
- 'postgres:14'
29-
- 'postgres:12'
3030
include:
31+
- postgres-image: postgres:17
32+
postgres-auth: scram-sha-256
3133
- postgres-image: postgres:16
3234
postgres-auth: scram-sha-256
3335
- postgres-image: postgres:14
3436
postgres-auth: md5
35-
- postgres-image: postgres:12
36-
postgres-auth: trust
3737
container:
3838
image: ${{ matrix.image }}
3939
volumes: [ 'pgrunshare:/var/run/postgresql' ]
@@ -68,6 +68,7 @@ jobs:
6868
-ignore-filename-regex="\/Benchmarks\/" \
6969
-instr-profile .build/debug/codecov/default.profdata > info.lcov
7070
- name: Upload to codecov.io
71-
uses: codecov/codecov-action@v5
71+
uses: codecov/codecov-action@v4
7272
with:
73-
file: info.lcov
73+
files: info.lcov
74+
token: ${{ secrets.CODECOV_TOKEN }}

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let package = Package(
1111
dependencies: [
1212
.package(url: "https://github.com/hummingbird-project/swift-jobs.git", from: "1.0.0-beta.7"),
1313
.package(url: "https://github.com/hummingbird-project/hummingbird-postgres.git", from: "0.5.0"),
14-
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.21.0"),
14+
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.25.0"),
1515
],
1616
targets: [
1717
.target(

Sources/JobsPostgres/PostgresClient+Transaction.swift

-31
This file was deleted.

docker-compose.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
postgres:
3+
image: postgres:16.3-alpine
4+
ports:
5+
- 5432:5432
6+
volumes:
7+
- db:/var/lib/postgresql/hummingbird
8+
environment:
9+
- POSTGRES_PASSWORD=test_password
10+
- POSTGRES_USER=test_user
11+
- POSTGRES_DB=test_db
12+
volumes:
13+
db:
14+
driver: local

0 commit comments

Comments
 (0)