1
1
name : test
2
- on : [ 'pull_request' ]
2
+ on :
3
+ pull_request : { branches: ['*'] }
4
+ push : { branches: ['main'] }
5
+
3
6
env :
4
7
LOG_LEVEL : debug
8
+ SWIFT_DETERMINISTIC_HASHING : 1
5
9
POSTGRES_HOSTNAME : ' psql-a'
6
10
POSTGRES_HOSTNAME_A : ' psql-a'
7
11
POSTGRES_HOSTNAME_B : ' psql-b'
19
23
# Baseline test run for code coverage stats
20
24
codecov :
21
25
strategy :
22
- matrix : { dbimage: ['postgres:14 '], dbauth: ['scram-sha-256'] }
26
+ matrix : { dbimage: ['postgres:15 '], dbauth: ['scram-sha-256'] }
23
27
runs-on : ubuntu-latest
24
- container : swift:5.6-focal
28
+ container : swift:5.7-jammy
25
29
services :
26
30
psql-a :
27
31
image : ${{ matrix.dbimage }}
51
55
52
56
# Check for API breakage versus main
53
57
api-breakage :
58
+ if : github.event_name == 'pull_request'
54
59
runs-on : ubuntu-latest
55
- container : swift:5.6-focal
60
+ container : swift:5.7-jammy
56
61
steps :
57
62
- name : Check out package
58
63
uses : actions/checkout@v3
@@ -66,18 +71,22 @@ jobs:
66
71
67
72
# Run Linux unit tests against various configurations
68
73
linux-unit :
74
+ if : github.event_name == 'pull_request'
69
75
strategy :
70
76
fail-fast : false
71
77
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
+ ]
75
84
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'},
78
87
{dbimage: 'postgres:11', dbauth: 'trust'}
79
88
]
80
- container : ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
89
+ container : ${{ matrix.swiftver }}
81
90
runs-on : ubuntu-latest
82
91
services :
83
92
psql-a :
@@ -104,14 +113,18 @@ jobs:
104
113
105
114
# Test integration with dependent package on Linux
106
115
linux-integration :
116
+ if : github.event_name == 'pull_request'
107
117
strategy :
108
118
fail-fast : false
109
119
matrix :
110
- dbimage : ['postgres:14 ']
120
+ dbimage : ['postgres:15 ']
111
121
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 }}
115
128
runs-on : ubuntu-latest
116
129
services :
117
130
psql-a :
@@ -144,14 +157,14 @@ jobs:
144
157
145
158
# Run macOS unit tests against various configurations
146
159
macos-unit :
160
+ if : github.event_name == 'pull_request'
147
161
strategy :
148
162
fail-fast : false
149
163
matrix :
150
- dbimage : ['postgresql']
164
+ dbimage : ['postgresql@14'] # N.B.: As of this writing, Homebrew didn't have Postgres 15 yet
151
165
dbauth : ['scram-sha-256']
152
166
macos : ['macos-11', 'macos-12']
153
- xcode : ['latest-stable', 'latest']
154
- exclude : [{ macos: 'macos-11', xcode: 'latest' }]
167
+ xcode : ['latest-stable']
155
168
runs-on : ${{ matrix.macos }}
156
169
env :
157
170
POSTGRES_HOSTNAME : 127.0.0.1
0 commit comments