Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/xcode-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ jobs:
-scheme potassiumProvider \
-destination 'platform=macOS' \
CODE_SIGNING_ALLOWED=NO

- name: Run unit tests on macOS
run: |
xcodebuild test \
-project potassiumProvider.xcodeproj \
-scheme potassiumProvider \
-destination 'platform=macOS' \
MACOSX_DEPLOYMENT_TARGET=26.4 \
CODE_SIGNING_ALLOWED=NO
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ xcodebuild build \
-destination 'generic/platform=visionOS'
```

Run tests:
Run unit tests:

```sh
xcodebuild test \
Expand All @@ -110,7 +110,7 @@ xcodebuild test \
-destination 'platform=iOS Simulator,OS=26.5,name=iPhone 17'
```

Run tests on Mac as well:
Run unit tests on Mac as well:

```sh
xcodebuild test \
Expand All @@ -119,7 +119,7 @@ xcodebuild test \
-destination 'platform=macOS'
```

Run tests on visionOS as well:
Run unit tests on visionOS as well:

```sh
xcodebuild test \
Expand All @@ -128,16 +128,9 @@ xcodebuild test \
-destination 'platform=visionOS Simulator,OS=26.5,name=Apple Vision Pro'
```

If the full scheme stalls during simulator/UI-test cleanup, this has previously
worked more reliably:

```sh
xcodebuild test \
-project potassiumProvider.xcodeproj \
-scheme potassiumProvider \
-destination 'platform=iOS Simulator,OS=26.5,name=iPhone 17' \
-parallel-testing-enabled NO
```
The shared scheme's Test action contains `potassiumProviderTests` only. UI
automation remains a separate Xcode test-target workflow and does not run in
the command-line matrix above.

Use `xcodebuild -showdestinations` to copy exact Mac or visionOS destinations if
local Xcode requires a more specific variant.
Expand Down
49 changes: 22 additions & 27 deletions doc/TESTING_AND_DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ source of truth.
- Unit test target: `potassiumProviderTests`
- UI test target: `potassiumProviderUITests`

The shared `potassiumProvider` scheme runs `potassiumProviderTests` in its Test
action. UI automation remains a separate Xcode test-target workflow and is not
part of the shared scheme's command-line test path.

Do not use Tuist or root-level SwiftPM commands for validation unless the
project is intentionally migrated.

Expand Down Expand Up @@ -70,7 +74,7 @@ xcodebuild build \
-destination 'platform=macOS'
```

Run all tests:
Run unit tests:

```sh
xcodebuild test \
Expand All @@ -79,7 +83,7 @@ xcodebuild test \
-destination 'platform=iOS Simulator,OS=26.5,name=iPhone 17'
```

Run all tests on Mac as well:
Run unit tests on Mac as well:

```sh
xcodebuild test \
Expand All @@ -88,45 +92,36 @@ xcodebuild test \
-destination 'platform=macOS'
```

Run only unit tests:

```sh
xcodebuild test \
-project potassiumProvider.xcodeproj \
-scheme potassiumProvider \
-destination 'platform=iOS Simulator,OS=26.5,name=iPhone 17' \
-only-testing:potassiumProviderTests
```

If the full scheme stalls during simulator/UI-test cleanup, retry with:

```sh
xcodebuild test \
-project potassiumProvider.xcodeproj \
-scheme potassiumProvider \
-destination 'platform=iOS Simulator,OS=26.5,name=iPhone 17' \
-parallel-testing-enabled NO
```

Use `xcodebuild -showdestinations` to copy the exact Mac destination if local
Xcode requires a more specific macOS variant.

## Continuous Integration

GitHub Actions runs an unsigned macOS build for every pull request and every
push to `main`. The build uses the `macos-26` runner and its default Xcode 26.5
installation:
GitHub Actions runs an unsigned macOS build followed by the macOS unit tests for
every pull request and every push to `main`. The job uses the `macos-26` runner
and its default Xcode 26.5 installation:

```sh
xcodebuild build \
-project potassiumProvider.xcodeproj \
-scheme potassiumProvider \
-destination 'platform=macOS' \
CODE_SIGNING_ALLOWED=NO

xcodebuild test \
-project potassiumProvider.xcodeproj \
-scheme potassiumProvider \
-destination 'platform=macOS' \
MACOSX_DEPLOYMENT_TARGET=26.4 \
CODE_SIGNING_ALLOWED=NO
```

This initial workflow checks compilation only. Unit tests, UI tests, caching,
and iOS Simulator and visionOS jobs remain outside its scope.
The build and test commands run as consecutive steps in the same job and share
the resolved package checkout and DerivedData directory. The CI-only
deployment-target override allows the tests to run on the hosted runner's
macOS 26.4 installation without changing the project's macOS 26.5 deployment
target. UI tests, caching, iOS Simulator and visionOS jobs, and the manual File
Provider release gates remain outside its scope.

## Test Style

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@
ReferencedContainer = "container:potassiumProvider.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C098429C2FF847B000CB8B7E"
BuildableName = "potassiumProviderUITests.xctest"
BlueprintName = "potassiumProviderUITests"
ReferencedContainer = "container:potassiumProvider.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand Down Expand Up @@ -78,16 +64,6 @@
ReferencedContainer = "container:potassiumProvider.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C098429C2FF847B000CB8B7E"
BuildableName = "potassiumProviderUITests.xctest"
BlueprintName = "potassiumProviderUITests"
ReferencedContainer = "container:potassiumProvider.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down