Skip to content

Commit 9685d6b

Browse files
committed
Dropped Swift 5.9 and fixed nightly CI
* Dropped Swift 5.9 * Adopt Swift 6.1 * Fixed nightly CI
1 parent 47c5885 commit 9685d6b

File tree

2 files changed

+92
-74
lines changed

2 files changed

+92
-74
lines changed

.github/workflows/ci.yml

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- '**.swift'
9-
- '**.yml'
10-
pull_request:
11-
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "**.swift"
9+
- "**.yml"
10+
pull_request:
11+
workflow_dispatch:
1212
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}-ci
14-
cancel-in-progress: true
13+
group: ${{ github.workflow }}-${{ github.ref }}-ci
14+
cancel-in-progress: true
1515

1616
jobs:
17-
linux:
18-
runs-on: ubuntu-latest
19-
timeout-minutes: 15
20-
strategy:
21-
matrix:
22-
image:
23-
- 'swift:5.9'
24-
- 'swift:5.10'
25-
- 'swift:6.0'
26-
postgres-image:
27-
- 'postgres:17'
28-
- 'postgres:16'
29-
- 'postgres:14'
30-
include:
31-
- postgres-image: postgres:17
32-
postgres-auth: scram-sha-256
33-
- postgres-image: postgres:16
34-
postgres-auth: scram-sha-256
35-
- postgres-image: postgres:14
36-
postgres-auth: md5
37-
container:
38-
image: ${{ matrix.image }}
39-
volumes: [ 'pgrunshare:/var/run/postgresql' ]
40-
env:
41-
POSTGRES_DB: 'test_database'
42-
POSTGRES_USER: 'test_user'
43-
POSTGRES_PASSWORD: 'test_password'
44-
POSTGRES_HOSTNAME: 'psql'
45-
POSTGRES_SOCKET: '/var/run/postgresql/.s.PGSQL.5432'
46-
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
47-
services:
48-
psql:
49-
image: ${{ matrix.postgres-image }}
50-
volumes: [ 'pgrunshare:/var/run/postgresql' ]
17+
linux:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
strategy:
21+
matrix:
22+
image:
23+
- "swift:5.10"
24+
- "swift:6.0"
25+
- "swift:6.1"
26+
postgres-image:
27+
- "postgres:17"
28+
- "postgres:16"
29+
- "postgres:14"
30+
include:
31+
- postgres-image: postgres:17
32+
postgres-auth: scram-sha-256
33+
- postgres-image: postgres:16
34+
postgres-auth: scram-sha-256
35+
- postgres-image: postgres:14
36+
postgres-auth: md5
37+
container:
38+
image: ${{ matrix.image }}
39+
volumes: ["pgrunshare:/var/run/postgresql"]
5140
env:
52-
POSTGRES_DB: 'test_database'
53-
POSTGRES_USER: 'test_user'
54-
POSTGRES_PASSWORD: 'test_password'
55-
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
56-
POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }}
57-
steps:
58-
- name: Checkout
59-
uses: actions/checkout@v4
60-
- name: Test
61-
run: |
62-
swift test --enable-code-coverage
63-
- name: Convert coverage files
64-
run: |
65-
llvm-cov export -format="lcov" \
66-
.build/debug/swift-jobs-postgresPackageTests.xctest \
67-
-ignore-filename-regex="\/Tests\/" \
68-
-ignore-filename-regex="\/Benchmarks\/" \
69-
-instr-profile .build/debug/codecov/default.profdata > info.lcov
70-
- name: Upload to codecov.io
71-
uses: codecov/codecov-action@v4
72-
with:
73-
files: info.lcov
74-
token: ${{ secrets.CODECOV_TOKEN }}
41+
POSTGRES_DB: "test_database"
42+
POSTGRES_USER: "test_user"
43+
POSTGRES_PASSWORD: "test_password"
44+
POSTGRES_HOSTNAME: "psql"
45+
POSTGRES_SOCKET: "/var/run/postgresql/.s.PGSQL.5432"
46+
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
47+
services:
48+
psql:
49+
image: ${{ matrix.postgres-image }}
50+
volumes: ["pgrunshare:/var/run/postgresql"]
51+
env:
52+
POSTGRES_DB: "test_database"
53+
POSTGRES_USER: "test_user"
54+
POSTGRES_PASSWORD: "test_password"
55+
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
56+
POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }}
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
- name: Test
61+
run: |
62+
swift test --enable-code-coverage
63+
- name: Convert coverage files
64+
run: |
65+
llvm-cov export -format="lcov" \
66+
.build/debug/swift-jobs-postgresPackageTests.xctest \
67+
-ignore-filename-regex="\/Tests\/" \
68+
-ignore-filename-regex="\/Benchmarks\/" \
69+
-instr-profile .build/debug/codecov/default.profdata > info.lcov
70+
- name: Upload to codecov.io
71+
uses: codecov/codecov-action@v4
72+
with:
73+
files: info.lcov
74+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/nightly.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,35 @@ jobs:
1010
strategy:
1111
matrix:
1212
image: ['nightly-focal', 'nightly-jammy', 'nightly-amazonlinux2']
13-
services:
14-
redis:
15-
image: redis
16-
ports:
17-
- 6379:6379
18-
options: --entrypoint redis-server
13+
postgres-image:
14+
- "postgres:17"
15+
- "postgres:14"
16+
include:
17+
- postgres-image: postgres:17
18+
postgres-auth: scram-sha-256
19+
- postgres-image: postgres:14
20+
postgres-auth: md5
1921

2022
container:
2123
image: swiftlang/swift:${{ matrix.image }}
24+
volumes: ["pgrunshare:/var/run/postgresql"]
2225
env:
23-
REDIS_HOSTNAME: "redis"
26+
POSTGRES_DB: "test_database"
27+
POSTGRES_USER: "test_user"
28+
POSTGRES_PASSWORD: "test_password"
29+
POSTGRES_HOSTNAME: "psql"
30+
POSTGRES_SOCKET: "/var/run/postgresql/.s.PGSQL.5432"
31+
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
32+
services:
33+
psql:
34+
image: ${{ matrix.postgres-image }}
35+
volumes: ["pgrunshare:/var/run/postgresql"]
36+
env:
37+
POSTGRES_DB: "test_database"
38+
POSTGRES_USER: "test_user"
39+
POSTGRES_PASSWORD: "test_password"
40+
POSTGRES_HOST_AUTH_METHOD: ${{ matrix.postgres-auth }}
41+
POSTGRES_INITDB_ARGS: --auth-host=${{ matrix.postgres-auth }}
2442

2543
steps:
2644
- name: Checkout

0 commit comments

Comments
 (0)