Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add visionOS unit tests to pipeline #58

Closed
wants to merge 3 commits into from
Closed
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Added conformance to `Hashable`, `Codable` and `Sendable` to custom types: `LanguageCode`, `Ligature`, `Spacing`, `SpellingState` & `WritingDirection`
- Added `@frozen` annotations to enums and resultbuilder struct
- Added visionOS tests to CI pipeline

### Changed

Expand Down
2 changes: 2 additions & 0 deletions fastlane/.env.visionos
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
XC_SCAN_DESTINATION = "platform=visionOS Simulator,name=Apple Vision Pro"
PLATFORM_BUILD_DIRECTORY = "visionOS"
10 changes: 5 additions & 5 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ before_all do |lane, options|
end
end

desc "Run all tests for: macOS, iOS, tvOS & watchOS"
desc "Run all tests for: macOS, iOS, tvOS, watchOS & visionOS"
lane :test_all do
env_names.each do |env|
Dotenv.overload "#{env}"
test
end
end

desc "Run tests for a specific platform. Use --env to select an environment. (ios, macos, tvos or watchos)"
desc "Run tests for a specific platform. Use --env to select an environment. (ios, macos, tvos, watchos or visionos)"
lane :test do |options|
UI.important("Test #{ENV['PLATFORM_BUILD_DIRECTORY']}")
scan(
Expand All @@ -33,15 +33,15 @@ lane :test do |options|
)
end

desc "Generate code coverage reports for: macOS, iOS, tvOS & watchOS"
desc "Generate code coverage reports for: macOS, iOS, tvOS, watchOS & visionOS"
lane :code_coverage_all do |options|
env_names.each do |env|
Dotenv.overload "#{env}"
code_coverage
end
end

desc "Generate code coverage report for a specific platform. Use --env to select the environment. (ios, macos, tvos or watchos)"
desc "Generate code coverage report for a specific platform. Use --env to select the environment. (ios, macos, tvos, watchos or visionos)"
lane :code_coverage do |options|
UI.important("Generate coverage for #{ENV['PLATFORM_BUILD_DIRECTORY']}")
slather(
Expand Down Expand Up @@ -74,5 +74,5 @@ def coverage_output_directory
end

def env_names
[".env.ios", ".env.macos", ".env.tvos", ".env.watchos"]
[".env.ios", ".env.macos", ".env.tvos", ".env.watchos", ".env.visionos"]
end
8 changes: 4 additions & 4 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
[bundle exec] fastlane test_all
```

Run all tests for: macOS, iOS, tvOS & watchOS
Run all tests for: macOS, iOS, tvOS, watchOS & visionOS

### test

```sh
[bundle exec] fastlane test
```

Run tests for a specific platform. Use --env to select an environment. (ios, macos, tvos or watchos)
Run tests for a specific platform. Use --env to select an environment. (ios, macos, tvos, watchos or visionos)

### code_coverage_all

```sh
[bundle exec] fastlane code_coverage_all
```

Generate code coverage reports for: macOS, iOS, tvOS & watchOS
Generate code coverage reports for: macOS, iOS, tvOS, watchOS & visionOS

### code_coverage

```sh
[bundle exec] fastlane code_coverage
```

Generate code coverage report for a specific platform. Use --env to select the environment. (ios, macos, tvos or watchos)
Generate code coverage report for a specific platform. Use --env to select the environment. (ios, macos, tvos, watchos or visionos)

----

Expand Down
Loading