Skip to content

Commit 76634e0

Browse files
committed
docs: standardize README and CI configuration
- Update badges to standard CI + Development Status format - Add comprehensive CI matrix: Swift 6.1/6.2, macOS, Linux, Windows - Add README examples validation job - Add swift-format workflow for auto-formatting - Add swiftlint workflow for linting - Add dependabot configuration - All 36 README verification tests pass
1 parent d3b199c commit 76634e0

File tree

5 files changed

+167
-134
lines changed

5 files changed

+167
-134
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "swift"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "monthly"

.github/workflows/ci.yml

Lines changed: 58 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,94 @@
11
name: CI
2-
32
on:
43
push:
5-
branches:
6-
- main
4+
branches: [main]
75
pull_request:
8-
branches:
9-
- '*'
6+
branches: [main]
107
workflow_dispatch:
118

129
concurrency:
1310
group: ci-${{ github.ref }}
1411
cancel-in-progress: true
1512

1613
jobs:
17-
macos:
18-
name: macOS (Xcode ${{ matrix.xcode }})
19-
runs-on: macos-${{ matrix.os }}
14+
macos-swift61:
15+
name: macOS (Swift 6.1)
16+
runs-on: macos-26
2017
strategy:
21-
fail-fast: false
2218
matrix:
23-
include:
24-
- os: '26'
25-
xcode: '26.0'
26-
swift: '6.2'
19+
xcode: ['26.0']
20+
config: ['debug', 'release']
2721
steps:
2822
- uses: actions/checkout@v5
29-
3023
- name: Select Xcode ${{ matrix.xcode }}
3124
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
32-
33-
- name: Print environment
34-
run: |
35-
xcodebuild -version
36-
swift --version
37-
echo "macOS $(sw_vers -productVersion)"
38-
25+
- name: Print Swift version
26+
run: swift --version
3927
- name: Cache Swift packages
4028
uses: actions/cache@v4
4129
with:
4230
path: .build
43-
key: ${{ runner.os }}-xcode-${{ matrix.xcode }}-spm-${{ hashFiles('Package.swift') }}
44-
restore-keys: |
45-
${{ runner.os }}-xcode-${{ matrix.xcode }}-spm-
46-
${{ runner.os }}-spm-
47-
48-
- name: Build and test
49-
run: swift test --filter StructuredQueriesPostgresTests
50-
timeout-minutes: 15
31+
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
32+
restore-keys: ${{ runner.os }}-spm-
33+
- name: Build
34+
run: swift build -c ${{ matrix.config }}
35+
- name: Run tests
36+
run: swift test -c ${{ matrix.config }}
5137

52-
linux:
53-
name: Linux (Swift ${{ matrix.swift }})
54-
runs-on: ubuntu-latest
55-
container: swift:${{ matrix.swift }}
38+
macos-swift62:
39+
name: macOS (Swift 6.2)
40+
runs-on: macos-26
5641
strategy:
57-
fail-fast: false
5842
matrix:
59-
swift:
60-
- '6.1'
61-
- '6.2'
43+
xcode: ['26.0']
44+
config: ['debug', 'release']
6245
steps:
6346
- uses: actions/checkout@v5
64-
65-
- name: Print environment
66-
run: |
67-
swift --version
68-
uname -a
69-
47+
- name: Select Xcode ${{ matrix.xcode }}
48+
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
49+
- name: Print Swift version
50+
run: swift --version
7051
- name: Cache Swift packages
7152
uses: actions/cache@v4
7253
with:
7354
path: .build
74-
key: linux-swift-${{ matrix.swift }}-spm-${{ hashFiles('Package.swift') }}
75-
restore-keys: |
76-
linux-swift-${{ matrix.swift }}-spm-
77-
linux-spm-
55+
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
56+
restore-keys: ${{ runner.os }}-spm-
57+
- name: Build
58+
run: swift build -c ${{ matrix.config }}
59+
- name: Run tests
60+
run: swift test -c ${{ matrix.config }}
7861

79-
- name: Build and test
80-
run: swift test --filter StructuredQueriesPostgresTests
81-
timeout-minutes: 15
62+
linux-swift62:
63+
name: Ubuntu (Swift 6.2)
64+
runs-on: ubuntu-latest
65+
container: swift:6.2
66+
steps:
67+
- uses: actions/checkout@v5
68+
- name: Build
69+
run: swift build
70+
- name: Run tests
71+
run: swift test
8272

83-
documentation:
84-
name: Documentation
85-
runs-on: macos-26
73+
windows:
74+
name: Windows (Swift 6.2)
75+
runs-on: windows-latest
8676
steps:
8777
- uses: actions/checkout@v5
78+
- uses: SwiftyLab/setup-swift@latest
79+
with:
80+
swift-version: "6.2"
81+
- name: Build
82+
run: swift build
83+
- name: Run tests
84+
run: swift test
8885

86+
readme-validation:
87+
name: README Code Examples
88+
runs-on: macos-26
89+
steps:
90+
- uses: actions/checkout@v5
8991
- name: Select Xcode
90-
run: sudo xcode-select -s /Applications/Xcode_26.0.1.app
91-
92-
- name: Build documentation
93-
run: |
94-
swift package \
95-
--allow-writing-to-directory ./docs \
96-
generate-documentation \
97-
--target StructuredQueriesCore \
98-
--output-path ./docs \
99-
--transform-for-static-hosting \
100-
--hosting-base-path swift-structured-queries-postgres
101-
continue-on-error: true # DocC may not be fully configured yet
92+
run: sudo xcode-select -s /Applications/Xcode_26.0.app
93+
- name: Run README verification tests
94+
run: swift test --filter READMEExamplesTests

.github/workflows/swift-format.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Swift Format
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
format:
8+
runs-on: macos-26
9+
steps:
10+
- uses: actions/checkout@v5
11+
- name: Format code
12+
run: swift-format format --recursive --in-place Sources Tests
13+
- name: Commit changes
14+
uses: stefanzweifel/git-auto-commit-action@v7
15+
with:
16+
commit_message: "Run swift-format"

.github/workflows/swiftlint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: SwiftLint
2+
on:
3+
pull_request:
4+
branches: [main]
5+
6+
jobs:
7+
lint:
8+
runs-on: macos-26
9+
steps:
10+
- uses: actions/checkout@v5
11+
- name: SwiftLint
12+
run: swiftlint lint
13+
continue-on-error: true

0 commit comments

Comments
 (0)