7
7
push : { branches: [ main ] }
8
8
9
9
env :
10
- LOG_LEVEL : debug
10
+ LOG_LEVEL : info
11
11
SWIFT_DETERMINISTIC_HASHING : 1
12
12
MYSQL_HOSTNAME : ' mysql-a'
13
13
MYSQL_HOSTNAME_A : ' mysql-a'
24
24
25
25
jobs :
26
26
27
- # Check for API breakage versus main
28
27
api-breakage :
29
- if : ${{ github.event_name == 'pull_request' && ! github.event.pull_request.draft }}
28
+ if : ${{ !( github.event.pull_request.draft || false) }}
30
29
runs-on : ubuntu-latest
31
30
container : swift:5.8-jammy
32
31
steps :
33
- - name : Check out package
32
+ - name : Check out code
34
33
uses : actions/checkout@v3
35
- with : { fetch-depth: 0 }
36
- # https://github.com/actions/checkout/issues/766
37
- - name : Mark the workspace as safe
38
- run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
39
- - name : Check for API breaking changes
40
- run : swift package diagnose-api-breaking-changes origin/main
34
+ with : { 'fetch-depth': 0 }
35
+ - name : Run API breakage check action
36
+ uses : vapor/ci/.github/actions/ci-swift-check-api-breakage@reusable-workflows
41
37
42
- # Test integration with downstream Fluent driver
43
38
dependents :
44
39
if : ${{ !(github.event.pull_request.draft || false) }}
45
40
runs-on : ubuntu-latest
65
60
dbimage :
66
61
- mysql:5.7
67
62
- mysql:8.0
68
- - mariadb:10. 11
63
+ - mariadb:11
69
64
- percona:8.0
70
65
steps :
71
66
- name : Check out package
@@ -91,15 +86,13 @@ jobs:
91
86
- mysql:5.7
92
87
- mysql:8.0
93
88
- mariadb:10.4
94
- - mariadb:10. 11
89
+ - mariadb:11
95
90
- percona:8.0
96
91
runner :
97
92
# List is deliberately incomplete; we want to avoid running 50 jobs on every commit
98
93
- swift:5.6-focal
99
- # - swift:5.7-jammy
100
94
- swift:5.8-jammy
101
95
- swiftlang/swift:nightly-5.9-jammy
102
- # - swiftlang/swift:nightly-main-jammy
103
96
container : ${{ matrix.runner }}
104
97
runs-on : ubuntu-latest
105
98
services :
@@ -114,19 +107,22 @@ jobs:
114
107
- name : Save MySQL version to env
115
108
run : |
116
109
echo MYSQL_VERSION='${{ matrix.dbimage }}' >> $GITHUB_ENV
110
+ - name : Display versions
111
+ shell : bash
112
+ run : |
113
+ if [[ '${{ contains(matrix.container, 'nightly') }}' == 'true' ]]; then
114
+ SWIFT_PLATFORM="$(source /etc/os-release && echo "${ID}${VERSION_ID}")" SWIFT_VERSION="$(cat /.swift_tag)"
115
+ printf 'SWIFT_PLATFORM=%s\nSWIFT_VERSION=%s\n' "${SWIFT_PLATFORM}" "${SWIFT_VERSION}" >>"${GITHUB_ENV}"
116
+ fi
117
+ printf 'OS: %s\nTag: %s\nVersion:\n' "${SWIFT_PLATFORM}-${RUNNER_ARCH}" "${SWIFT_VERSION}" && swift --version
117
118
- name : Check out package
118
119
uses : actions/checkout@v3
119
120
- name : Run local tests with coverage and TSan
120
121
run : swift test --enable-code-coverage --sanitize=thread
121
122
- name : Submit coverage report to Codecov.io
122
- if : ${{ !contains(matrix.runner, '5.8') }}
123
123
124
124
with :
125
- cc_flags : ' unittests'
126
125
cc_env_vars : ' SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,MYSQL_VERSION'
127
- cc_fail_ci_if_error : true
128
- cc_verbose : true
129
- cc_dry_run : false
130
126
131
127
# Run unit tests (macOS). Don't bother with lots of variations, Linux will cover that.
132
128
macos-unit :
@@ -135,7 +131,7 @@ jobs:
135
131
fail-fast : false
136
132
matrix :
137
133
138
- macos : [ 'macos-12 ' ]
134
+ macos : [ 'macos-13 ' ]
139
135
xcode : [ 'latest-stable' ]
140
136
runs-on : ${{ matrix.macos }}
141
137
steps :
@@ -162,15 +158,3 @@ jobs:
162
158
- name : Run tests with Thread Sanitizer
163
159
run : swift test --sanitize=thread
164
160
env : { MYSQL_HOSTNAME: '127.0.0.1' }
165
-
166
- test-exports :
167
- if : ${{ !(github.event.pull_request.draft || false) }}
168
- name : Test exports
169
- runs-on : ubuntu-latest
170
- container : swift:5.8-jammy
171
- steps :
172
- - name : Check out package
173
- uses : actions/checkout@v3
174
- with : { fetch-depth: 0 }
175
- - name : Build
176
- run : swift build -Xswiftc -DBUILDING_DOCC
0 commit comments