BarredEwe / Prefire

đŸ”„ A library based on SwiftUI Preview, for easy generation: Playbook view, Snapshot and Accessibility tests
Apache License 2.0
295 stars 19 forks source link

Xcode Cloud & Prefire #62

Open ynnckcmprnl opened 5 months ago

ynnckcmprnl commented 5 months ago

I've got Prefire up & running in a package on my own machine. I'm trying to get the tests running on Xcode Cloud but it seems like the snapshots tests aren't run. The plain XCTest included in the package tests is being run though.

I have added a ci_post_clone.sh script which resolved the "PrefireTestsPlugin" is disabled error I initially had. So again, it all seems set up correctly.

Before I dig deeper & post more info, can anyone confirm it has actually worked on Xcode Cloud?

BarredEwe commented 5 months ago

Hi, I haven't tried using Prefire with Xcode Cloud. Will try it soon and see how it works.

ynnckcmprnl commented 5 months ago

Hi, I haven't tried using Prefire with Xcode Cloud. Will try it soon and see how it works.

Any news yet?

BarredEwe commented 4 months ago

Hi, I haven't tried using Prefire with Xcode Cloud. Will try it soon and see how it works.

Any news yet?

I can't use Xcode Cloud yet, as I don't have my own developer account đŸ„Č

ynnckcmprnl commented 3 months ago

I can't use Xcode Cloud yet, as I don't have my own developer account đŸ„Č

Any guesses/hunches why it wouldn't work that might help our own investigation?

BarredEwe commented 3 months ago

Any guesses/hunches why it wouldn't work that might help our own investigation?

Found similar problems with other plugins. It seems that Xcode Cloud does not have permission to run the plugin.

https://github.com/realm/SwiftLint/issues/3996

BarredEwe commented 3 months ago

Maybe this might help: https://github.com/realm/SwiftLint/issues/3996#issuecomment-1465866150

borut-t commented 1 month ago

I have a similar issue on Github Actions. I was able to resolve plugin permission issue, but snapshot tests aren't run. Just the one I have.

Run set -o pipefail && env NSUnbufferedIO=YES xcodebuild test -destination 'name=iPhone 16 Pro,OS=18.0' -scheme 'AppUI' | xcbeautify --renderer github-actions

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:21850AAF-7D30-4815-922B-F728672D2AC3, OS:18.0, name:iPhone 16 Pro }
{ platform:iOS Simulator, id:21850AAF-7D30-4815-922B-F728672D2AC3, OS:18.0, name:iPhone 16 Pro }
2024-10-02 07:37:09.911 xcodebuild[23552:132771] [MT] IDETestOperationsObserverDebug: 12.979 elapsed -- Testing started completed.
2024-10-02 07:37:09.911 xcodebuild[23552:132771] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2024-10-02 07:37:09.911 xcodebuild[23552:132771] [MT] IDETestOperationsObserverDebug: 12.979 sec, +12.979 sec -- end
The following build commands failed:
    Running Prefire
(1 failure)
----- xcbeautify -----
Version: 2.11.0
----------------------
Resolving Package Graph
Fetching https://github.com/swiftlang/swift-syntax
Fetching https://github.com/SimplyDanny/SwiftLintPlugins
Fetching https://github.com/BarredEwe/Prefire
Fetching https://github.com/pointfreeco/swift-snapshot-testing
Checking out ‘Prefire’ @ 2.9.0
Checking out ‘swift-snapshot-testing’ @ 1.17.5
Checking out ‘SwiftLintPlugins’ @ 0.57.0
Checking out ‘swift-syntax’ @ 600.0.1

When I run this command locally from the terminal, test suite "Test Suite 'PreviewTests'" is executed. On CI is not.

@BarredEwe ☝