Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
7b3933e
ci tests now using the macos26 runner
krugerk Oct 28, 2025
64e2a9d
Enable force quit for simulator during run_tests
krugerk Oct 28, 2025
039ed20
back to 15, checking if the force quit did the trick
krugerk Oct 28, 2025
d64d33d
tinkering with run_tests
krugerk Oct 28, 2025
ca73b71
and rolling forward
krugerk Oct 28, 2025
d7099f1
back to force quit simulator
krugerk Oct 28, 2025
6d31c5e
How about prelaunching?
krugerk Oct 29, 2025
8e7271c
Sorted by mostly just a touch to trigger ci
krugerk Oct 29, 2025
8605c93
What if retting was problematic
krugerk Oct 29, 2025
f538ccd
Still timing out
krugerk Oct 30, 2025
9e44ea8
reinstall_app
krugerk Oct 30, 2025
5230126
Touching to trigger CI
krugerk Oct 30, 2025
80826ad
Touching by bumping ruby
krugerk Nov 1, 2025
eafb3e8
3.3.5
krugerk Nov 1, 2025
058c0a6
touch
krugerk Dec 12, 2025
e6e9bef
Specify Xcode version to 26.2
krugerk Jan 8, 2026
a30d94b
Merge branch 'master' into patch-1
krugerk Feb 21, 2026
85c0a1b
merged with diff markers
krugerk Feb 21, 2026
e00b891
downgrade not necessary
krugerk Feb 21, 2026
6da9833
what about separate jobs
krugerk Feb 21, 2026
3b5115a
no swiftlint, yet
krugerk Feb 21, 2026
5fe484b
unit tests
krugerk Feb 21, 2026
8a9b0bd
destination directly, not iudid, for now
krugerk Feb 21, 2026
26ec752
how about udid like this
krugerk Feb 21, 2026
5e26b94
same simulator
krugerk Feb 21, 2026
a8ca959
destination
krugerk Feb 21, 2026
06f7295
env
krugerk Feb 21, 2026
3b213d2
destination
krugerk Feb 21, 2026
e745838
and fetch
krugerk Feb 21, 2026
b410503
when cached
krugerk Feb 21, 2026
c8f656a
skipping download if exists
krugerk Feb 21, 2026
ac85fe8
prepare
krugerk Feb 21, 2026
84e48ae
devices rather than destination
krugerk Feb 21, 2026
e441fee
no shared sim
krugerk Feb 21, 2026
34d891a
deleting everything
krugerk Feb 21, 2026
dfada1a
destination again
krugerk Feb 21, 2026
bd6aa87
prepare
krugerk Feb 21, 2026
c7e726c
prepare
krugerk Feb 21, 2026
f11fa00
formatting
krugerk Feb 21, 2026
57a1757
sim udid
krugerk Feb 21, 2026
b7801f0
ui test and unit test and include beekittests
krugerk Feb 21, 2026
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
113 changes: 100 additions & 13 deletions .github/workflows/fastlane-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,128 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
XCODE_VERSION: 26.2

jobs:
build:
cache-spm:
runs-on: macos-26
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: actions/cache@v5
id: cache
with:
path: |
SPMCache
~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-spm-xcode-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-xcode-
lookup-only: true
- name: Resolve SPM dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: xcodebuild -resolvePackageDependencies -scheme BeeSwift

unit-test:
runs-on: macos-26
needs: cache-spm
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- uses: actions/checkout@v6
- name: Use sample configuration
run: cp BeeKit/Config.swift.sample BeeKit/Config.swift
- uses: actions/cache@v5
with:
path: |
SPMCache
~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-spm-xcode-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-xcode-
- name: Setup ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.5'
bundler-cache: true
- name: Enable Macros
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Create Simulator and Get UDID
id: sim_udid
run: |
UDID=$(xcrun simctl create "Test-iPhone" com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-2)
echo "SIMULATOR_UDID=$UDID" >> $GITHUB_ENV
- name: bundle exec fastlane unit_test
run: bundle exec fastlane unit_test
env:
SIMULATOR_UDID: ${{ env.SIMULATOR_UDID }}
- name: Upload unit test report
uses: actions/upload-artifact@v6
if: always()
with:
name: unit-test-output
path: fastlane/test_output

ui-test:
runs-on: macos-26
needs: cache-spm
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.1'
xcode-version: ${{ env.XCODE_VERSION }}
- uses: actions/checkout@v6
- name: Use sample configuration
run: cp BeeKit/Config.swift.sample BeeKit/Config.swift
- uses: actions/cache@v5
with:
path: SPMCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
path: |
SPMCache
~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-spm-xcode-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
${{ runner.os }}-spm-xcode-
- name: Setup ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.5'
bundler-cache: true
- name: Enable Macros
run: defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: Run tests
run: bundle exec fastlane ci
- name: Upload report
- name: Create Simulator and Get UDID
id: sim_udid
run: |
UDID=$(xcrun simctl create "Test-iPhone" com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-2)
echo "SIMULATOR_UDID=$UDID" >> $GITHUB_ENV
- name: bundle exec fastlane ui_test
run: bundle exec fastlane ui_test
env:
SIMULATOR_UDID: ${{ env.SIMULATOR_UDID }}
- name: Upload UI test report
uses: actions/upload-artifact@v6
if: always() # always run even if the previous step fails
if: always()
with:
name: test-output
name: ui-test-output
path: fastlane/test_output

report:
runs-on: macos-26
needs: [unit-test, ui-test]
if: always()
steps:
- uses: actions/checkout@v6
- name: Download unit test artifacts
uses: actions/download-artifact@v4
with:
name: unit-test-output
path: fastlane/test_output_unit
- name: Download UI test artifacts
uses: actions/download-artifact@v4
with:
name: ui-test-output
path: fastlane/test_output_ui
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always() # always run even if the previous step fails
if: always()
with:
report_paths: 'fastlane/test_output/report.junit'
report_paths: 'fastlane/test_output_unit/report.junit,fastlane/test_output_ui/report.junit'
46 changes: 35 additions & 11 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,56 @@ platform :ios do
reset_simulator: true,
)
end
lane :ci do
sh("xcrun simctl list devices")
sleep 1

sh("xcrun simctl delete all")
sleep 5


lane :list_simctl do
sh("xcrun simctl list devicetypes")
sh("xcrun simctl list runtimes")

sh("xcrun simctl create Test-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-1")
sleep 5
sh("xcrun simctl list devices")
end

lane :unit_test do
prepare_simulator

run_tests(
scheme: "BeeSwift",
destination: "platform=iOS Simulator,name=Test-iPhone,OS=26.1",
destination: ENV["DESTINATION"],
prelaunch_simulator: true,
reset_simulator: true,
include_simulator_logs: true,
buildlog_path: "fastlane/test_output",
ensure_devices_found: true,
cloned_source_packages_path: "SPMCache",
xcodebuild_formatter: "xcbeautify --renderer github-actions",
only_testing: ["BeeSwiftTests", "BeeKitTests"]
)
end

lane :ui_test do
prepare_simulator

run_tests(
scheme: "BeeSwift",
destination: ENV["DESTINATION"],
prelaunch_simulator: true,
reset_simulator: true,
include_simulator_logs: true,
buildlog_path: "fastlane/test_output",
ensure_devices_found: true,
cloned_source_packages_path: "SPMCache",
xcodebuild_formatter: "xcbeautify --renderer github-actions",
only_testing: ["BeeSwiftUITests"]
)
end

lane :prepare_simulator do
# using simulator_udid from environment variable if set, otherwise creating our default
simulator_udid = ENV["SIMULATOR_UDID"] || sh("xcrun simctl create Test-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro com.apple.CoreSimulator.SimRuntime.iOS-26-2")
destination = "platform=iOS Simulator,id=#{simulator_udid}"
puts "simulator created with UDID: #{simulator_udid}"
puts "destination defined: #{destination}"
ENV["DESTINATION"] = destination
end

lane :build do
build_app(scheme: "BeeSwift")
end
Expand Down
24 changes: 24 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,30 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do



### ios list_simctl

```sh
[bundle exec] fastlane ios list_simctl
```



### ios unit_test

```sh
[bundle exec] fastlane ios unit_test
```



### ios prepare_simulator

```sh
[bundle exec] fastlane ios prepare_simulator
```



### ios ci

```sh
Expand Down
Loading