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

CI: added workaround for Snapshots in Xcode Cloud #2857

Merged
merged 3 commits into from
Oct 21, 2023

Conversation

NachoSoto
Copy link
Contributor

@NachoSoto NachoSoto commented Jul 20, 2023

@NachoSoto NachoSoto added the ci label Jul 20, 2023
@NachoSoto NachoSoto requested a review from a team July 20, 2023 20:40
Base automatically changed from xcode-cloud to main July 23, 2023 18:20
@NachoSoto NachoSoto force-pushed the xcode-cloud-snapshots branch 14 times, most recently from 9eb5a1f to 328d0e8 Compare July 30, 2023 14:33
"value" : "1"
},
{
"key" : "XCODE_CLOUD",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New test plan to have this.

@@ -0,0 +1,15 @@
{
"headers" : {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these were missing.

"Authorization" : "Bearer asharedsecret"
"Authorization" : "Bearer asharedsecret",
"X-Nonce" : "MTIzNDU2Nzg5MGFi",
"X-Post-Params-Hash" : "app_user_id,fetch_token:sha256:2cc3741ddb808ae6fd179f1398d9115b58772590765edf799ec778f929faa46d"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these were outdated.

func assertSnapshot(_ data: ProductRequestData,
testName: String = #function,
line: UInt = #line) {
SnapshotTesting.assertSnapshot(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needed to call our overload now.

Comment on lines +61 to +72
let ciPathPrefix = "/Volumes/workspace/repository/ci_scripts/"
let components = URL(string: file.description)!.pathComponents
let projectIndex = components.firstIndex(of: "repository")!
let folders = components[(projectIndex + 1)..<components.endIndex - 1].joined(separator: "/")
let fileName = (components[components.endIndex - 1] as NSString).deletingPathExtension

snapshotDirectory = "\(ciPathPrefix)\(folders)/__Snapshots__/\(fileName)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary for Xcode Cloud to be able to read snapshots.

@@ -0,0 +1 @@
../Tests/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary for Xcode Cloud to have access to test snapshots.

@NachoSoto NachoSoto marked this pull request as ready for review July 30, 2023 16:03
@NachoSoto
Copy link
Contributor Author

This is ready.

@NachoSoto NachoSoto force-pushed the xcode-cloud-snapshots branch 3 times, most recently from 6c95a98 to 774a42f Compare August 2, 2023 22:07
@NachoSoto
Copy link
Contributor Author

I have no idea what's going on with Codecov :(

@tonidero
Copy link
Contributor

tonidero commented Aug 8, 2023

Hmm tests seems to have passed, and codecov seems to have gotten stuck... Did you try rerunning tests? (seems like the last run was 6 days ago)

@NachoSoto
Copy link
Contributor Author

Yeah I re-ran several times and tried increasing timeouts. No luck, so I filed a but with them: codecov/uploader#1126

@NachoSoto NachoSoto force-pushed the xcode-cloud-snapshots branch 2 times, most recently from fa4df3b to e5a94b2 Compare August 14, 2023 22:21
@NachoSoto NachoSoto changed the base branch from main to circle-ci-xcode-13-jobs September 6, 2023 00:57
Base automatically changed from circle-ci-xcode-13-jobs to main September 6, 2023 16:32
@NachoSoto NachoSoto enabled auto-merge (squash) October 19, 2023 21:21
@NachoSoto NachoSoto merged commit 4d95c03 into main Oct 21, 2023
19 checks passed
@NachoSoto NachoSoto deleted the xcode-cloud-snapshots branch October 21, 2023 18:12
This was referenced Oct 25, 2023
NachoSoto added a commit that referenced this pull request Oct 26, 2023
**This is an automatic release.**

### New Features
* `PaywallColor`: change visibility of `Color.init(light:dark:)` to
`private` (#3345) via NachoSoto (@NachoSoto)
### RevenueCatUI
* `Paywalls`: new `.onPurchaseCompleted` overload with
`StoreTransaction` (#3323) via NachoSoto (@NachoSoto)
* `Paywalls`: finished template 5 (#3340) via NachoSoto (@NachoSoto)
* `Paywalls`: new `onDismiss` parameter for `presentPaywallIfNeeded`
(#3342) via NachoSoto (@NachoSoto)
* `Paywalls`: disable shimmering on footer loading view (#3324) via
NachoSoto (@NachoSoto)
### Bugfixes
* `ErrorUtils.purchasesError(withSKError:)`: handle `URLError`s (#3346)
via NachoSoto (@NachoSoto)
### Other Changes
* `Paywalls`: add identifier to events (#3332) via Josh Holtz
(@joshdholtz)
* `Paywalls`: create new event session when paywall appears (#3330) via
Josh Holtz (@joshdholtz)
* `HTTPClient`: verbose logs for request IDs (#3320) via NachoSoto
(@NachoSoto)
* `Paywalls Tester`: fix `macOS` build (#3341) via NachoSoto
(@NachoSoto)
* `ProductFetcherSK1`: enable `TimingUtil` log (#3327) via NachoSoto
(@NachoSoto)
* `Paywall Tester`: fixed paywall presentation (#3339) via NachoSoto
(@NachoSoto)
* `CI`: replace Carthage build jobs with `xcodebuild` (#3338) via
NachoSoto (@NachoSoto)
* `Integration Tests`: use repetition count from test plan (#3329) via
NachoSoto (@NachoSoto)
* `Integration Tests`: new logs for troubleshooting flaky tests (#3328)
via NachoSoto (@NachoSoto)
* `CircleCI`: change iOS 17 job to use M1 Large resource (#3322) via
NachoSoto (@NachoSoto)
* `Paywalls Tester`: fix release build (#3321) via NachoSoto
(@NachoSoto)
* `Paywalls`: enable all iOS 17 tests (#3331) via NachoSoto (@NachoSoto)
* `CI`: added workaround for Snapshots in `Xcode Cloud` (#2857) via
NachoSoto (@NachoSoto)
* `StoreKit 1`: disabled `finishTransactions` log on observer mode
(#3314) via NachoSoto (@NachoSoto)

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants