Update CI to latest versions#97
Open
mokagio wants to merge 7 commits into
Open
Conversation
Exposes a new public method on Parsely for firing conversion events (newsletter signups, subscriptions, purchases, link clicks, lead capture, and arbitrary custom conversions) using the existing event queue, flush, and mobileproxy pipeline. - `ConversionType` enum mirrors the categories accepted by the Parse.ly conversions backend (newsletter_signup, lead_capture, link_click, subscription, purchase, custom). - `trackConversion(url:conversionType:conversionLabel:...)` merges `_conversion_type` and `_conversion_label` into the event's `extra_data` alongside caller-supplied keys. Reserved keys can't be overridden by caller `extraData`. - The event is dispatched through `Track.conversion(...)` mirroring the existing `pageview(...)` shape — no changes to `Event`, the queue, the flush timer, or `RequestBuilder`. - New tests cover the queue path, the reserved-key guarantee, and the public Parsely.trackConversion entry point. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds two buttons on the First tab — "Track Pageview (sandbox)" and "Track Conversion (sandbox)" — that fire against the `sandbox.joshhanson.io` apikey on a shared test URL. The pageview lets a session accrue history before the conversion fires so the conversions topology has something to attribute to. Used during the manual end-to-end verification of trackConversion: with Proxyman attached, confirm action=conversion and the _conversion_type / _conversion_label keys land in the on-wire payload, then watch dash.parsely.com for the conversion in the conversions report. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chose despite being out of active maintenance because it's the latest version currently supported by Automattic's CI. Granted, we don't have Automattic's CI in this repo, but at least we can keep things consistent, as we'll get there _eventually_.
Discovered because current iOS version on my machine is 26.4.1
There was a problem hiding this comment.
Pull request overview
This PR introduces a public conversion-tracking API to the Parsely iOS SDK (plus supporting tests/demo updates) and also updates parts of the CI/tooling configuration to newer defaults.
Changes:
- Added
Parsely.trackConversion(...)and aConversionTypeenum; implemented conversion event construction by merging reserved keys intoextra_data. - Added unit tests covering conversion event shape and reserved-key overwrites; updated the demo app UI to exercise the new API.
- Updated CI/tooling defaults (GitHub Actions workflow, simulator name, Ruby version) and relaxed the User-Agent test regex.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/TrackTests.swift | Adds unit tests for Track.conversion event shape and reserved-key overwrite behavior. |
| Tests/RequestBuilderTests.swift | Updates User-Agent regex to allow iOS patch versions. |
| Tests/ParselyTrackerTests.swift | Adds a unit test for the public Parsely.trackConversion(...) API. |
| Sources/Track.swift | Implements conversion(...) event creation and merges conversion keys into extra_data. |
| Sources/ParselyTracker.swift | Adds ConversionType and the public/private trackConversion entry points. |
| Makefile | Updates the default simulator device name used by make test. |
| Demo/ParselyDemo/FirstViewController.swift | Adds sandbox pageview/conversion actions and hard-coded sandbox constants. |
| Demo/ParselyDemo/Base.lproj/Main.storyboard | Adds demo UI elements wired to the new sandbox actions. |
| CHANGES.rst | Documents the new trackConversion API in the Unreleased changelog. |
| .ruby-version | Updates Ruby version used for tooling. |
| .github/workflows/ios.yml | Changes CI matrix to “latest” but leaves Xcode setup referencing a removed matrix key. |
Comments suppressed due to low confidence (2)
.github/workflows/ios.yml:24
- The workflow references
${{ matrix.xcode }}in thesetup-xcodestep, but the job matrix no longer defines anxcodeentry. Definexcodein the matrix (e.g.latest-stable) or hardcode/remove thesetup-xcodestep to avoid a runtime workflow failure.
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}
- name: Build and Test
.github/workflows/ios.yml:18
- The PR description only mentions building on #96 (conversion tracking), but this PR also modifies CI configuration here (runner selection / Xcode setup). Please update the PR description to mention the CI/tooling changes or split them into a separate PR so review and rollback scope stays clear.
include:
# Only using "latest" CI for the moment.
# We'll decide later whether to keep running tests on older environments
- macos: "latest"
runs-on: ${{ matrix.macos }}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,5 +1,5 @@ | |||
| # TODO: Use newer Sim. Sticking with it at the moment because we know it works in the existing GitHub action setup. | |||
Comment on lines
+149
to
+163
| private func _trackConversion( | ||
| url: String, | ||
| conversionType: ConversionType, | ||
| conversionLabel: String, | ||
| urlref: String, | ||
| metadata: ParselyMetadata?, | ||
| extraData: Dictionary<String, Any>?, | ||
| siteId: String | ||
| ) { | ||
| var _siteId = siteId | ||
| if _siteId == "" { | ||
| _siteId = self.apikey | ||
| } | ||
| os_log("Tracking Conversion", log: OSLog.tracker, type: .debug) | ||
| track.conversion( |
Comment on lines
+9
to
+12
| // the conversion buttons fire against this URL on the `sandbox.joshhanson.io` apikey | ||
| // so pageview history and conversion events share a visitor session in the backend. | ||
| private let sandboxUrl = "https://sandbox.joshhanson.io/path/test-conversion2" | ||
| private let sandboxSiteId = "sandbox.joshhanson.io" |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on top of #96, but can't point to it because it's an outside contribution.