2525jobs :
2626 # Check for API breakage versus main
2727 api-breakage :
28- if : ${{ !(github.event.pull_request.draft || false) }}
28+ if : ${{ github.event_name == 'pull_request' && !(github.event.pull_request.draft || false) }}
2929 runs-on : ubuntu-latest
3030 container : swift:jammy
3131 steps :
32- - name : Check out code
33- uses : actions/checkout@v3
32+ - name : Checkout
33+ uses : actions/checkout@v4
3434 with : { 'fetch-depth': 0 }
35- - name : Run API breakage check action
36- uses : vapor/ci/.github/actions/ci-swift-check-api-breakage@main
35+ - name : API breaking changes
36+ run : |
37+ git config --global --add safe.directory "${GITHUB_WORKSPACE}"
38+ swift package diagnose-api-breaking-changes origin/main
39+
40+ dependency-graph :
41+ if : ${{ github.event_name == 'push' }}
42+ runs-on : ubuntu-latest
43+ container : swift:jammy
44+ permissions :
45+ contents : write
46+ steps :
47+ - name : Check out code
48+ uses : actions/checkout@v4
49+ - name : Fix Git configuration
50+ run : |
51+ git config --global --add safe.directory "${GITHUB_WORKSPACE}"
52+ apt-get update && apt-get install -y curl
53+ - name : Submit dependency graph
54+ uses :
vapor-community/[email protected] 3755
3856 code-coverage :
3957 if : ${{ !(github.event.pull_request.draft || false) }}
4058 runs-on : ubuntu-latest
4159 container : swift:jammy
4260 services :
4361 psql-a :
44- image : postgres:15
62+ image : postgres:16
4563 env :
4664 POSTGRES_USER : test_username
4765 POSTGRES_DB : test_database
@@ -50,58 +68,60 @@ jobs:
5068 POSTGRES_INITDB_ARGS : --auth-host=scram-sha-256
5169 steps :
5270 - name : Check out code
53- uses : actions/checkout@v3
71+ uses : actions/checkout@v4
5472 - name : Run unit tests for coverage data
5573 run : swift test --enable-code-coverage
5674 - name : Upload coverage data
57755876
5977 gh-codeql :
60- if : ${{ !(github.event.pull_request.draft || false) }}
61- strategy :
62- fail-fast : false
63- matrix :
64- runner_os :
65- - ubuntu-latest
66- - macos-13
67- runs-on : ${{ matrix.runner_os }}
68- permissions :
69- security-events : write
78+ if : ${{ false && !(github.event.pull_request.draft || false) }}
79+ runs-on : ubuntu-latest
80+ container :
81+ image : swift:5.9-jammy
82+ permissions : { actions: write, contents: read, security-events: write }
83+ timeout-minutes : 60
7084 steps :
71- - name : Select appropriate Xcode version
72- if : ${{ startsWith(matrix.runner_os, 'macos') }}
73- uses : maxim-lobanov/setup-xcode@v1
74- with : { xcode-version: '~14.3' }
7585 - name : Check out code
76- uses : actions/checkout@v3
86+ uses : actions/checkout@v4
87+ - name : Mark repo safe in non-fake global config
88+ run : |
89+ git config --global --add safe.directory "${GITHUB_WORKSPACE}"
90+ - name : Check Swift compatibility
91+ id : swift-check
92+ uses : vapor/ci/.github/actions/check-compatible-swift@main
7793 - name : Initialize CodeQL
78- uses : github/codeql-action/init@v2
94+ if : ${{ steps.swift-check.outputs.swift-compatible == 'true' }}
95+ uses : github/codeql-action/init@v3
7996 with : { languages: swift }
8097 - name : Perform build
98+ if : ${{ steps.swift-check.outputs.swift-compatible == 'true' }}
8199 run : swift build
82100 - name : Run CodeQL analyze
83- uses : github/codeql-action/analyze@v2
101+ if : ${{ steps.swift-check.outputs.swift-compatible == 'true' }}
102+ uses : github/codeql-action/analyze@v3
84103
85104 linux-unit :
86105 if : ${{ !(github.event.pull_request.draft || false) }}
87106 strategy :
88107 fail-fast : false
89108 matrix :
90109 postgres-image :
91- - postgres:15
92- - postgres:13
93- - postgres:11
110+ - postgres:16
111+ - postgres:14
112+ - postgres:12
94113 swift-image :
95114 - swift:5.7-jammy
96115 - swift:5.8-jammy
97- - swiftlang/swift:nightly-5.9-jammy
116+ - swift:5.9-jammy
117+ - swiftlang/swift:nightly-5.10-jammy
98118 - swiftlang/swift:nightly-main-jammy
99119 include :
100- - postgres-image : postgres:15
120+ - postgres-image : postgres:16
101121 postgres-auth : scram-sha-256
102- - postgres-image : postgres:13
122+ - postgres-image : postgres:14
103123 postgres-auth : md5
104- - postgres-image : postgres:11
124+ - postgres-image : postgres:12
105125 postgres-auth : trust
106126 runs-on : ubuntu-latest
107127 container : ${{ matrix.swift-image }}
@@ -116,17 +136,17 @@ jobs:
116136 POSTGRES_INITDB_ARGS : --auth-host=${{ matrix.postgres-auth }}
117137 steps :
118138 - name : Check out package
119- uses : actions/checkout@v3
139+ uses : actions/checkout@v4
120140 - name : Run local tests
121141 run : swift test
122142
123143 linux-integration :
124144 if : ${{ !(github.event.pull_request.draft || false) }}
125145 runs-on : ubuntu-latest
126- container : swift:5.8 -jammy
146+ container : swift:5.9 -jammy
127147 services :
128148 psql-a :
129- image : postgres:15
149+ image : postgres:16
130150 env :
131151 POSTGRES_USER : test_username
132152 POSTGRES_DB : test_database
@@ -143,10 +163,10 @@ jobs:
143163 POSTGRES_INITDB_ARGS : --auth-host=scram-sha-256
144164 steps :
145165 - name : Check out package
146- uses : actions/checkout@v3
166+ uses : actions/checkout@v4
147167 with : { path: 'postgres-kit' }
148168 - name : Check out fluent-postgres-driver dependent
149- uses : actions/checkout@v3
169+ uses : actions/checkout@v4
150170 with : { repository: 'vapor/fluent-postgres-driver', path: 'fluent-postgres-driver' }
151171 - name : Use local package
152172 run : swift package --package-path fluent-postgres-driver edit postgres-kit --path postgres-kit
@@ -158,10 +178,12 @@ jobs:
158178 strategy :
159179 fail-fast : false
160180 matrix :
161- xcode-version :
162- - ' ~14.3'
163- - ' 15.0-beta'
164- runs-on : macos-13
181+ include :
182+ - macos-version : macos-13
183+ xcode-version : ' ~14.3'
184+ - macos-version : macos-14
185+ xcode-version : latest
186+ runs-on : ${{ matrix.macos-version }}
165187 env :
166188 POSTGRES_HOSTNAME : 127.0.0.1
167189 POSTGRES_DB : postgres
@@ -173,11 +195,11 @@ jobs:
173195 - name : Install Postgres, setup DB and auth, and wait for server start
174196 run : |
175197 export PATH="$(brew --prefix)/opt/postgresql@14/bin:$PATH" PGDATA=/tmp/vapor-postgres-test
176- (brew unlink postgresql || true) && brew install "postgresql@14 " && brew link --force "postgresql@14 "
198+ (brew unlink postgresql || true) && brew install "postgresql@15 " && brew link --force "postgresql@15 "
177199 initdb --locale=C --auth-host "scram-sha-256" -U "${POSTGRES_USER}" --pwfile=<(echo "${POSTGRES_PASSWORD}")
178200 pg_ctl start --wait
179201 timeout-minutes : 2
180202 - name : Checkout code
181- uses : actions/checkout@v3
203+ uses : actions/checkout@v4
182204 - name : Run local tests
183205 run : swift test
0 commit comments