77 push : { branches: [ main ] }
88
99env :
10- LOG_LEVEL : debug
10+ LOG_LEVEL : info
1111 SWIFT_DETERMINISTIC_HASHING : 1
1212 MYSQL_HOSTNAME : ' mysql-a'
1313 MYSQL_HOSTNAME_A : ' mysql-a'
2424
2525jobs :
2626
27- # Check for API breakage versus main
2827 api-breakage :
29- if : ${{ github.event_name == 'pull_request' && ! github.event.pull_request.draft }}
28+ if : ${{ !( github.event.pull_request.draft || false) }}
3029 runs-on : ubuntu-latest
3130 container : swift:5.8-jammy
3231 steps :
33- - name : Check out package
32+ - name : Check out code
3433 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
4137
42- # Test integration with downstream Fluent driver
4338 dependents :
4439 if : ${{ !(github.event.pull_request.draft || false) }}
4540 runs-on : ubuntu-latest
6560 dbimage :
6661 - mysql:5.7
6762 - mysql:8.0
68- - mariadb:10. 11
63+ - mariadb:11
6964 - percona:8.0
7065 steps :
7166 - name : Check out package
@@ -91,15 +86,13 @@ jobs:
9186 - mysql:5.7
9287 - mysql:8.0
9388 - mariadb:10.4
94- - mariadb:10. 11
89+ - mariadb:11
9590 - percona:8.0
9691 runner :
9792 # List is deliberately incomplete; we want to avoid running 50 jobs on every commit
9893 - swift:5.6-focal
99- # - swift:5.7-jammy
10094 - swift:5.8-jammy
10195 - swiftlang/swift:nightly-5.9-jammy
102- # - swiftlang/swift:nightly-main-jammy
10396 container : ${{ matrix.runner }}
10497 runs-on : ubuntu-latest
10598 services :
@@ -114,19 +107,22 @@ jobs:
114107 - name : Save MySQL version to env
115108 run : |
116109 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
117118 - name : Check out package
118119 uses : actions/checkout@v3
119120 - name : Run local tests with coverage and TSan
120121 run : swift test --enable-code-coverage --sanitize=thread
121122 - name : Submit coverage report to Codecov.io
122- if : ${{ !contains(matrix.runner, '5.8') }}
123123 uses : vapor/swift-codecov-action@v0.2
124124 with :
125- cc_flags : ' unittests'
126125 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
130126
131127 # Run unit tests (macOS). Don't bother with lots of variations, Linux will cover that.
132128 macos-unit :
@@ -135,7 +131,7 @@ jobs:
135131 fail-fast : false
136132 matrix :
137133 formula : [ 'mysql@8.0' ]
138- macos : [ 'macos-12 ' ]
134+ macos : [ 'macos-13 ' ]
139135 xcode : [ 'latest-stable' ]
140136 runs-on : ${{ matrix.macos }}
141137 steps :
@@ -162,15 +158,3 @@ jobs:
162158 - name : Run tests with Thread Sanitizer
163159 run : swift test --sanitize=thread
164160 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