Skip to content

Update CI to latest versions#97

Merged
mokagio merged 10 commits into
masterfrom
mokagio/ci-update
May 20, 2026
Merged

Update CI to latest versions#97
mokagio merged 10 commits into
masterfrom
mokagio/ci-update

Conversation

@mokagio

@mokagio mokagio commented May 15, 2026

Copy link
Copy Markdown
Contributor

Builds on top of #96, but can't point to it because it's an outside contribution.

@iangmaia @twstokes this is a bit confusing because of the fact it contains the changes from #96 also. But if you only look at the CI setup, you'll see it's pretty straightforward.

Once approved/iterated, I'll cherry pick any additional commit from #96 and merge this on master so that both changesets land in one go.

randyriback and others added 6 commits May 14, 2026 18:49
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
Copilot AI review requested due to automatic review settings May 15, 2026 01:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 a ConversionType enum; implemented conversion event construction by merging reserved keys into extra_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 the setup-xcode step, but the job matrix no longer defines an xcode entry. Define xcode in the matrix (e.g. latest-stable) or hardcode/remove the setup-xcode step 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.

Comment thread .github/workflows/ios.yml Outdated
Comment thread Makefile Outdated
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>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@twstokes twstokes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mokagio your individual commits LGTM

but can't point to it because it's an outside contribution

Since this is an A12 I'm not sure if it'd be simpler to grant them access to the repo so they could push directly to it?

randyriback and others added 2 commits May 20, 2026 14:18
Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
Address review feedback (#PR): the doc promised the conversions backend
drops events without a label, but the implementation would still enqueue
and send them — a guaranteed no-op event from the customer's perspective.

Now `_trackConversion` early-returns with a `.error`-level os_log when
`conversionLabel.isEmpty`, so the SDK matches its own documentation and
gives the developer a loud signal during integration instead of silently
shipping events that will never appear in reporting.

- Public doc updated to reflect the SDK-side skip.
- New test `testTrackConversionWithEmptyLabelDoesNotEnqueue` verifies an
  empty label does not produce a queued event.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mokagio mokagio enabled auto-merge May 20, 2026 04:26
@mokagio mokagio merged commit 648bbf5 into master May 20, 2026
1 check passed
@mokagio mokagio deleted the mokagio/ci-update branch May 20, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants