Skip to content

Commit 40b9f99

Browse files
authored
Switch this repo to doing its CI independently, plus some updates (#284)
* Switch this repo to doing its CI independently, plus some updates * Workaround for git safe.directory issue (see checkout/actions#766)
1 parent 3c0efd7 commit 40b9f99

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

.github/workflows/main-codecov.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
name: test
2-
on: [ 'pull_request' ]
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- "main"
6+
pull_request:
7+
branches:
8+
- "*"
39

410
jobs:
511
linux-unit:
612
strategy:
713
fail-fast: false
814
matrix:
9-
swiftver:
10-
- swift:5.2
11-
- swift:5.3
15+
swift:
16+
- swift:5.4
1217
- swift:5.5
1318
- swift:5.6
1419
- swiftlang/swift:nightly-main
15-
swiftos:
20+
os:
1621
- focal
17-
container: ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
22+
container: ${{ format('{0}-{1}', matrix.swift, matrix.os) }}
1823
runs-on: ubuntu-latest
1924
env:
2025
LOG_LEVEL: debug
@@ -33,6 +38,7 @@ jobs:
3338
cc_dry_run: false
3439

3540
linux-integration-and-dependencies:
41+
if: github.event_name == 'pull_request'
3642
strategy:
3743
fail-fast: false
3844
matrix:
@@ -104,6 +110,7 @@ jobs:
104110
run: swift test --package-path fluent-postgres-driver
105111

106112
macos-all:
113+
if: github.event_name == 'pull_request'
107114
strategy:
108115
fail-fast: false
109116
matrix:
@@ -116,7 +123,7 @@ jobs:
116123
xcode:
117124
- latest-stable
118125
#- latest
119-
runs-on: macos-11
126+
runs-on: macos-12
120127
env:
121128
LOG_LEVEL: debug
122129
POSTGRES_HOSTNAME: 127.0.0.1
@@ -142,3 +149,20 @@ jobs:
142149
run: |
143150
swift test --enable-test-discovery -Xlinker -rpath \
144151
-Xlinker $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx
152+
153+
api-breakage:
154+
if: github.event_name == 'pull_request'
155+
runs-on: ubuntu-latest
156+
container:
157+
image: swift:5.6-focal
158+
steps:
159+
- name: Checkout
160+
uses: actions/checkout@v3
161+
with:
162+
fetch-depth: 0
163+
# https://github.com/actions/checkout/issues/766
164+
- name: Mark the workspace as safe
165+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
166+
- name: API breaking changes
167+
run: |
168+
swift package diagnose-api-breaking-changes origin/main

0 commit comments

Comments
 (0)