Closed philtre closed 3 years ago
It seems this was happening because I was adding tests from my local SPM package into the main app scheme. This worked fine when running the tests in Xcode directly, but seemed to fail in CI/Fastlane.
Luckily, I found this PR which adds the ability to run tests in SPM packages, which I'm hoping will be shipped soon.
I modified the Gemfile
to refer to that feature branch:
gem 'fastlane', :git => 'https://github.com/fastlane/fastlane.git', :branch => 'joshdholtz-scan-spm-packages'
And created a separate lane for my local SPM package tests in fastlane/Fastfile
:
desc "Runs the Foo unit tests"
lane :foo_tests do
scan(
scheme: "Foo",
project: "Foo.xcodeproj",
devices: ["iPhone 11"],
cloned_source_packages_path: "SourcePackages"
)
end
desc "Runs the FooLib unit tests"
lane :foolib_tests do
scan(
scheme: "FooLib-Package",
package_path: "./FooLib",
devices: ["iPhone 11"],
cloned_source_packages_path: "SourcePackages"
)
end
And I updated the CircleCI configuration in .circleci/.config.yml
to run both test lanes (the app's and the shared libary's):
jobs:
run_tests:
<<: *base_job
shell: /bin/bash --login -o pipefail
steps:
- restore_git_cache
- reset_git
- checkout
- ssh_keychain_fix
- store_xcode_version
- restore_bundler_cache
- install_bundler
- cache_bundler
- restore_swift_package_manager_cache
- run:
name: Pre-load simulator
command: *preload_simulator
- run:
name: Run Foo Tests
command: bundle exec fastlane foo_tests
- run:
name: Run FooLib Tests
command: bundle exec fastlane foolib_tests
- cache_swift_package_manager
- store_test_results:
path: output/scan
I'll do some more testing and then close the issue if everything checks out.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest fastlane
version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane
and feel free to tackle this issue yourself :muscle:
This issue will be auto-closed if there is no reply within 1 month.
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:
New Issue Checklist
Issue Description
My CircleCI workflow has started failing with an error I can't seem to find any documentation for:
The above repeats a few times, then:
I've tried lots of different things and sometimes the error wouldn't happen and all tests would run normally, but then next time the error would occur again.
I couldn't find any documentation on the "Could not compute signing task inputs" error, and I've seen "Failed to compute path to baseline file during test run spec construction" referenced in a couple of issues but none of them seem to be related.
Any ideas why this might be happening?
Command executed
bundle exec fastlane foo_tests
Complete output when running fastlane, including the stack trace and command used
Environment
🚫 fastlane environment 🚫
### Stack | Key | Value | | --------------------------- | -------------------------------------------------- | | OS | 11.4 | | Ruby | 2.7.3 | | Bundler? | true | | Git | git version 2.32.0 | | Installation Source | ~/foo/vendor/bundle/ruby/2.7.0/bin/fastlane | | Host | macOS 11.4 (20F71) | | Ruby Lib Dir | ~/.rubies/ruby-2.7.3/lib | | OpenSSL Version | OpenSSL 1.0.2t 10 Sep 2019 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode-12.5.1.app/Contents/Developer/ | | Xcode Version | 12.5.1 | | Swift Version | 5.4.2 | ### System Locale | Error | | --------------------------- | | No Locale with UTF8 found 🚫 | ### fastlane files:`./fastlane/Fastfile`
```ruby fastlane_version '1.97.0' default_platform :ios platform :ios do before_all do |lane| lanes_to_skip = [:next] unless lanes_to_skip.include?(lane) setup_circle_ci end end desc "Runs the Foo unit tests" lane :foo_tests do scan( scheme: "Foo", project: "Foo.xcodeproj", devices: ["iPhone 11"], cloned_source_packages_path: "SourcePackages" ) end # Directory containing the .ipa file def build_output_directory ENV["BUILD_APP_OUTPUT_DIR"] || "." end after_all do |lane| end error do |lane, exception| end end ````./fastlane/Appfile`
```ruby app_identifier "com.foo.foo" # The bundle identifier of your app apple_id ENV["ITUNES_CONNECT_ACCOUNT"] || "foo@foo.com" # Your Apple email address itc_team_name "Foo, Inc." # you can even provide different app identifiers, Apple IDs and team names per lane: # More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md ```Loaded gems
| Gem | Version | | ------------------------------- | ------------ | | did_you_mean | 1.4.0 | | bundler | 2.2.20 | | uri | 0.10.0 | | rake | 13.0.6 | | CFPropertyList | 3.0.3 | | concurrent-ruby | 1.1.7 | | i18n | 1.8.7 | | minitest | 5.14.3 | | tzinfo | 2.0.4 | | zeitwerk | 2.4.2 | | activesupport | 6.1.1 | | public_suffix | 4.0.6 | | addressable | 2.8.0 | | artifactory | 3.0.15 | | atomos | 0.1.3 | | aws-eventstream | 1.1.1 | | aws-partitions | 1.479.0 | | aws-sigv4 | 1.2.4 | | jmespath | 1.4.0 | | aws-sdk-core | 3.117.0 | | aws-sdk-kms | 1.44.0 | | aws-sdk-s3 | 1.96.2 | | babosa | 1.0.4 | | claide | 1.0.3 | | clamp | 1.3.2 | | colored | 1.2 | | colored2 | 3.1.2 | | highline | 2.0.3 | | commander | 4.6.0 | | declarative | 0.0.20 | | digest-crc | 0.6.3 | | unf_ext | 0.0.7.7 | | unf | 0.1.4 | | domain_name | 0.5.20190701 | | dotenv | 2.7.6 | | emoji_regex | 3.2.2 | | excon | 0.85.0 | | faraday-em_http | 1.0.0 | | faraday-em_synchrony | 1.0.0 | | faraday-excon | 1.1.0 | | faraday-httpclient | 1.0.1 | | faraday-net_http | 1.0.1 | | faraday-net_http_persistent | 1.2.0 | | faraday-patron | 1.0.0 | | multipart-post | 2.0.0 | | ruby2_keywords | 0.0.5 | | faraday | 1.5.1 | | http-cookie | 1.0.4 | | faraday-cookie_jar | 0.0.7 | | faraday_middleware | 1.0.0 | | fastimage | 2.2.4 | | gh_inspector | 1.1.3 | | jwt | 2.2.3 | | memoist | 0.16.2 | | multi_json | 1.15.0 | | os | 1.1.1 | | signet | 0.15.0 | | googleauth | 0.16.2 | | httpclient | 2.8.3 | | mini_mime | 1.1.0 | | trailblazer-option | 0.1.1 | | uber | 0.1.0 | | representable | 3.1.1 | | retriable | 3.1.2 | | rexml | 3.2.5 | | webrick | 1.7.0 | | google-apis-core | 0.4.1 | | google-apis-androidpublisher_v3 | 0.8.0 | | google-apis-playcustomapp_v1 | 0.5.0 | | google-apis-iamcredentials_v1 | 0.6.0 | | google-apis-storage_v1 | 0.6.0 | | google-cloud-env | 1.5.0 | | google-cloud-errors | 1.1.0 | | google-cloud-core | 1.6.0 | | google-cloud-storage | 1.34.1 | | json | 2.5.1 | | mini_magick | 4.11.0 | | naturally | 2.2.1 | | plist | 3.6.0 | | rubyzip | 2.3.2 | | security | 0.1.3 | | simctl | 1.6.8 | | terminal-notifier | 2.0.0 | | unicode-display_width | 1.7.0 | | terminal-table | 1.8.0 | | tty-screen | 0.8.1 | | tty-cursor | 0.7.1 | | tty-spinner | 0.9.3 | | word_wrap | 1.0.0 | | nanaimo | 0.3.0 | | xcodeproj | 1.20.0 | | rouge | 2.0.7 | | xcpretty | 0.3.0 | | xcpretty-travis-formatter | 1.0.1 | | fastlane-plugin-appcenter | 1.11.1 | | http-accept | 1.7.0 | | mime-types-data | 3.2021.0704 | | mime-types | 3.3.1 | | netrc | 0.11.0 | | rest-client | 2.1.0 | | fastlane-plugin-browserstack | 0.3.2 | | fastlane-plugin-versioning | 0.5.0 | | mini_portile2 | 2.5.0 | | racc | 1.5.2 | | nokogiri | 1.11.1 | | slather | 2.6.0 |