Skip to content

Commit df9146a

Browse files
authored
Update CI to include Swift 5.7 and Postgres 15 (#233)
Update CI to include Swift 5.7 and Postgres 15. Merge codecov update for main into test workflow.
1 parent e979753 commit df9146a

File tree

2 files changed

+30
-57
lines changed

2 files changed

+30
-57
lines changed

.github/workflows/main-codecov.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: test
2-
on: [ 'pull_request' ]
2+
on:
3+
pull_request: { branches: ['*'] }
4+
push: { branches: ['main'] }
5+
36
env:
47
LOG_LEVEL: debug
8+
SWIFT_DETERMINISTIC_HASHING: 1
59
POSTGRES_HOSTNAME: 'psql-a'
610
POSTGRES_HOSTNAME_A: 'psql-a'
711
POSTGRES_HOSTNAME_B: 'psql-b'
@@ -19,9 +23,9 @@ jobs:
1923
# Baseline test run for code coverage stats
2024
codecov:
2125
strategy:
22-
matrix: { dbimage: ['postgres:14'], dbauth: ['scram-sha-256'] }
26+
matrix: { dbimage: ['postgres:15'], dbauth: ['scram-sha-256'] }
2327
runs-on: ubuntu-latest
24-
container: swift:5.6-focal
28+
container: swift:5.7-jammy
2529
services:
2630
psql-a:
2731
image: ${{ matrix.dbimage }}
@@ -51,8 +55,9 @@ jobs:
5155

5256
# Check for API breakage versus main
5357
api-breakage:
58+
if: github.event_name == 'pull_request'
5459
runs-on: ubuntu-latest
55-
container: swift:5.6-focal
60+
container: swift:5.7-jammy
5661
steps:
5762
- name: Check out package
5863
uses: actions/checkout@v3
@@ -66,18 +71,22 @@ jobs:
6671

6772
# Run Linux unit tests against various configurations
6873
linux-unit:
74+
if: github.event_name == 'pull_request'
6975
strategy:
7076
fail-fast: false
7177
matrix:
72-
dbimage: ['postgres:14', 'postgres:13', 'postgres:11']
73-
swiftver: ['swift:5.4', 'swift:5.5', 'swift:5.6', 'swiftlang/swift:nightly-main']
74-
swiftos: ['focal']
78+
dbimage: ['postgres:15', 'postgres:14', 'postgres:11']
79+
swiftver: [
80+
'swift:5.4-focal', 'swift:5.5-focal', 'swift:5.6-focal',
81+
'swift:5.7-jammy',
82+
'swiftlang/swift:nightly-main-jammy'
83+
]
7584
include: [
76-
{dbimage: 'postgres:14', dbauth: 'scram-sha-256'},
77-
{dbimage: 'postgres:13', dbauth: 'md5'},
85+
{dbimage: 'postgres:15', dbauth: 'scram-sha-256'},
86+
{dbimage: 'postgres:14', dbauth: 'md5'},
7887
{dbimage: 'postgres:11', dbauth: 'trust'}
7988
]
80-
container: ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
89+
container: ${{ matrix.swiftver }}
8190
runs-on: ubuntu-latest
8291
services:
8392
psql-a:
@@ -104,14 +113,18 @@ jobs:
104113

105114
# Test integration with dependent package on Linux
106115
linux-integration:
116+
if: github.event_name == 'pull_request'
107117
strategy:
108118
fail-fast: false
109119
matrix:
110-
dbimage: ['postgres:14']
120+
dbimage: ['postgres:15']
111121
dbauth: ['scram-sha-256']
112-
swiftver: ['swift:5.4', 'swift:5.5', 'swift:5.6', 'swiftlang/swift:nightly-main']
113-
swiftos: ['focal']
114-
container: ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
122+
swiftver: [
123+
'swift:5.4-focal', 'swift:5.5-focal', 'swift:5.6-focal',
124+
'swift:5.7-jammy',
125+
'swiftlang/swift:nightly-main-jammy'
126+
]
127+
container: ${{ matrix.swiftver }}
115128
runs-on: ubuntu-latest
116129
services:
117130
psql-a:
@@ -144,14 +157,14 @@ jobs:
144157

145158
# Run macOS unit tests against various configurations
146159
macos-unit:
160+
if: github.event_name == 'pull_request'
147161
strategy:
148162
fail-fast: false
149163
matrix:
150-
dbimage: ['postgresql']
164+
dbimage: ['postgresql@14'] # N.B.: As of this writing, Homebrew didn't have Postgres 15 yet
151165
dbauth: ['scram-sha-256']
152166
macos: ['macos-11', 'macos-12']
153-
xcode: ['latest-stable', 'latest']
154-
exclude: [{ macos: 'macos-11', xcode: 'latest' }]
167+
xcode: ['latest-stable']
155168
runs-on: ${{ matrix.macos }}
156169
env:
157170
POSTGRES_HOSTNAME: 127.0.0.1

0 commit comments

Comments
 (0)