Skip to content

Commit 20e55a3

Browse files
committed
ci: remove redundant builds and add iOS testing
Optimization improvements: 1. Remove redundant swift build steps - swift test builds automatically 2. Remove redundant README filter - already included in main test run 3. Add iOS Simulator testing to validate cross-platform compatibility 4. Rename job to reflect it tests both macOS and iOS Performance impact: - Eliminates 3 redundant build operations - Adds ~30s for iOS testing - Net result: faster CI with better platform coverage Technical details: - swift test automatically builds before testing - xcodebuild used for iOS Simulator testing - Tests run on iPhone 16 Pro simulator - Code coverage disabled for speed
1 parent 64659c9 commit 20e55a3

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17-
# Primary development workflow: Latest Swift on macOS with debug build
18-
# Includes README validation for fast feedback on development machines
19-
macos-latest:
20-
name: macOS (Swift 6.2, debug)
17+
# Primary development workflow: Latest Swift on macOS & iOS
18+
# Tests both macOS and iOS platforms for compatibility
19+
macos-ios-latest:
20+
name: macOS & iOS (Swift 6.2, debug)
2121
runs-on: macos-26
2222
steps:
2323
- uses: actions/checkout@v5
@@ -36,14 +36,18 @@ jobs:
3636
restore-keys: |
3737
${{ runner.os }}-spm-
3838
39-
- name: Build
40-
run: swift build -c debug
41-
42-
- name: Run tests
39+
# macOS tests (using swift test - builds automatically)
40+
- name: Test on macOS
4341
run: swift test -c debug
4442

45-
- name: Run README verification tests
46-
run: swift test --filter ReadmeVerificationTests
43+
# iOS validation (ensures no platform-specific issues)
44+
- name: Test on iOS Simulator
45+
run: |
46+
xcodebuild test \
47+
-scheme HTMLTypes \
48+
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
49+
-configuration debug \
50+
-enableCodeCoverage NO
4751
4852
# Production validation: Latest Swift on Linux with release build
4953
linux-latest:
@@ -60,10 +64,8 @@ jobs:
6064
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
6165
restore-keys: ${{ runner.os }}-spm-
6266

63-
- name: Build
64-
run: swift build -c release
65-
66-
- name: Run tests
67+
# Note: swift test builds automatically in release mode
68+
- name: Test (release)
6769
run: swift test -c release
6870

6971
# Compatibility check: Minimum supported Swift version (6.0)
@@ -82,13 +84,11 @@ jobs:
8284
key: ${{ runner.os }}-swift60-spm-${{ hashFiles('Package.resolved') }}
8385
restore-keys: ${{ runner.os }}-swift60-spm-
8486

85-
- name: Build
86-
run: swift build -c release
87-
88-
- name: Run tests
87+
# Note: swift test builds automatically
88+
- name: Test (Swift 6.0)
8989
run: swift test -c release
9090

91-
# Documentation generation (keep if you're publishing docs)
91+
# Documentation generation
9292
documentation:
9393
name: Documentation
9494
runs-on: macos-26

0 commit comments

Comments
 (0)