21
21
- swift:5.10-jammy
22
22
- swift:6.0-noble
23
23
- swift:6.1-noble
24
- - swiftlang/swift:nightly-main-jammy
24
+ - swiftlang/swift:nightly-6.2-noble
25
+ - swiftlang/swift:nightly-main-noble
25
26
container : ${{ matrix.swift-image }}
26
27
runs-on : ubuntu-latest
27
28
steps :
@@ -32,11 +33,16 @@ jobs:
32
33
[[ -z "${SWIFT_VERSION}" ]] && SWIFT_VERSION="$(cat /.swift_tag 2>/dev/null || true)"
33
34
printf 'OS: %s\nTag: %s\nVersion:\n' "${SWIFT_PLATFORM}-${RUNNER_ARCH}" "${SWIFT_VERSION}"
34
35
swift --version
36
+ - name : Install curl for Codecov
37
+ run : apt-get update -y -q && apt-get install -y curl
35
38
- name : Check out package
36
- uses : actions/checkout@v4
39
+ uses : actions/checkout@v5
37
40
- name : Run unit tests with Thread Sanitizer
41
+ shell : bash
38
42
run : |
39
- swift test --filter='^(PostgresNIOTests|ConnectionPoolModuleTests)' --sanitize=thread --enable-code-coverage
43
+ # https://github.com/swiftlang/swift/issues/74042 was never fixed in 5.10 and swift-crypto hits it in 6.0 as well
44
+ SANITIZE="$([[ "${SWIFT_VERSION}" =~ ^swift-(5|6\.0) ]] || echo '--sanitize=thread')"
45
+ swift test --filter='^(PostgresNIOTests|ConnectionPoolModuleTests)' ${SANITIZE} --enable-code-coverage
40
46
- name : Submit code coverage
41
47
uses : vapor/swift-codecov-action@v0.3
42
48
with :
@@ -103,15 +109,15 @@ jobs:
103
109
[[ -z "${SWIFT_VERSION}" ]] && SWIFT_VERSION="$(cat /.swift_tag 2>/dev/null || true)"
104
110
printf 'OS: %s\nTag: %s\nVersion:\n' "${SWIFT_PLATFORM}-${RUNNER_ARCH}" "${SWIFT_VERSION}" && swift --version
105
111
- name : Check out package
106
- uses : actions/checkout@v4
112
+ uses : actions/checkout@v5
107
113
with : { path: 'postgres-nio' }
108
114
- name : Run integration tests
109
115
run : swift test --package-path postgres-nio --filter=^IntegrationTests
110
116
- name : Check out postgres-kit dependent
111
- uses : actions/checkout@v4
117
+ uses : actions/checkout@v5
112
118
with : { repository: 'vapor/postgres-kit', path: 'postgres-kit' }
113
119
- name : Check out fluent-postgres-driver dependent
114
- uses : actions/checkout@v4
120
+ uses : actions/checkout@v5
115
121
with : { repository: 'vapor/fluent-postgres-driver', path: 'fluent-postgres-driver' }
116
122
- name : Use local package in dependents
117
123
run : |
@@ -132,11 +138,11 @@ jobs:
132
138
postgres-auth :
133
139
# Only test one auth method on macOS, Linux tests will cover the others
134
140
- scram-sha-256
135
- xcode-version :
136
- - ' ~15'
137
141
include :
138
- - xcode-version : ' ~15'
139
- macos-version : ' macos-14'
142
+ - macos-version : ' macos-14'
143
+ xcode-version : ' latest-stable'
144
+ - macos-version : ' macos-15'
145
+ xcode-version : ' latest-stable'
140
146
runs-on : ${{ matrix.macos-version }}
141
147
env :
142
148
POSTGRES_HOSTNAME : 127.0.0.1
@@ -154,18 +160,13 @@ jobs:
154
160
- name : Install Postgres, setup DB and auth, and wait for server start
155
161
run : |
156
162
export PATH="$(brew --prefix)/opt/${POSTGRES_FORMULA}/bin:$PATH" PGDATA=/tmp/vapor-postgres-test
157
- # ** BEGIN ** Work around bug in both Homebrew and GHA
158
- (brew upgrade python@3.11 || true) && (brew link --force --overwrite python@3.11 || true)
159
- (brew upgrade python@3.12 || true) && (brew link --force --overwrite python@3.12 || true)
160
- (brew upgrade || true)
161
- # ** END ** Work around bug in both Homebrew and GHA
162
163
brew install --overwrite "${POSTGRES_FORMULA}"
163
164
brew link --overwrite --force "${POSTGRES_FORMULA}"
164
165
initdb --locale=C --auth-host "${POSTGRES_AUTH_METHOD}" -U "${POSTGRES_USER}" --pwfile=<(echo "${POSTGRES_PASSWORD}")
165
166
pg_ctl start --wait
166
167
timeout-minutes : 15
167
168
- name : Checkout code
168
- uses : actions/checkout@v4
169
+ uses : actions/checkout@v5
169
170
- name : Run all tests
170
171
run : swift test
171
172
@@ -175,30 +176,11 @@ jobs:
175
176
container : swift:noble
176
177
steps :
177
178
- name : Checkout
178
- uses : actions/checkout@v4
179
+ uses : actions/checkout@v5
179
180
with :
180
181
fetch-depth : 0
181
182
# https://github.com/actions/checkout/issues/766
182
183
- name : API breaking changes
183
184
run : |
184
185
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
185
186
swift package diagnose-api-breaking-changes origin/main
186
-
187
- # gh-codeql:
188
- # if: ${{ false }}
189
- # runs-on: ubuntu-latest
190
- # container: swift:noble
191
- # permissions: { actions: write, contents: read, security-events: write }
192
- # steps:
193
- # - name: Check out code
194
- # uses: actions/checkout@v4
195
- # - name: Mark repo safe in non-fake global config
196
- # run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
197
- # - name: Initialize CodeQL
198
- # uses: github/codeql-action/init@v3
199
- # with:
200
- # languages: swift
201
- # - name: Perform build
202
- # run: swift build
203
- # - name: Run CodeQL analyze
204
- # uses: github/codeql-action/analyze@v3
0 commit comments