Skip to content

Commit 4b72569

Browse files
authored
feat: Fix existing tests, add actions to validate on pull request (#13)
1 parent 9bb1334 commit 4b72569

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

.github/workflows/pull-request.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
pr-branch-check-name:
8+
name: "Check PR for semantic branch name"
9+
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@stable
10+
pr-title-check:
11+
name: "Check PR for semantic title"
12+
uses: mParticle/mparticle-workflows/.github/workflows/pr-title-check.yml@stable
13+
pr-branch-target-gitflow:
14+
name: "Check PR for semantic target branch"
15+
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-gitflow.yml@stable
16+
17+
test:
18+
name: Test
19+
runs-on: macos-15
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Set up Xcode 16
24+
uses: maxim-lobanov/setup-xcode@v1
25+
with:
26+
xcode-version: 16.3.0
27+
- name: Run Tests
28+
run: >
29+
set -o pipefail &&
30+
xcodebuild test -project mParticle-Rokt.xcodeproj -scheme mParticle_RoktTests -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest'
31+
| xcbeautify --renderer github-actions
32+
shell: bash

mParticle_RoktTests/mParticle_RoktTests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ - (void)testLogBaseEvent {
127127
- (void)testExecuteWithViewName {
128128
id mockRoktSDK = OCMClassMock([Rokt class]);
129129

130-
RoktEmbeddedView *view = [[RoktEmbeddedView alloc] init];
130+
MPRoktEmbeddedView *view = [[MPRoktEmbeddedView alloc] init];
131131
NSString *viewName = @"TestView";
132132
NSDictionary *placements = @{@"placement1": view};
133133
NSDictionary *attributes = @{@"attr1": @"value1", @"sandbox": @"true"};
@@ -139,7 +139,7 @@ - (void)testExecuteWithViewName {
139139
};
140140

141141
// Expect Rokt execute call with correct parameters
142-
OCMExpect([mockRoktSDK executeWithViewName:@"TestView"
142+
OCMExpect([mockRoktSDK executeWithViewName:viewName
143143
attributes:expectedAttributes
144144
placements:OCMOCK_ANY
145145
config:nil

0 commit comments

Comments
 (0)