Skip to content

Commit

Permalink
ci(ios): run lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Adwin Ronald Ross committed Feb 19, 2025
1 parent 9023d31 commit 0e2f46b
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
pull_request:
paths:
- 'ios/**'

jobs:
lint_and_tests:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Swift
uses: fwal/setup-swift@v2

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'ios.yml' step
Uses Step
uses 'fwal/setup-swift' with ref 'v2', not a pinned commit hash
with:
swift-version: '5.10'

- name: Select Xcode Version
run: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

- name: Clean Derived Data
run: |
rm -rf ~/Library/Developer/Xcode/DerivedData
- name: Run Unit Tests
run: |
xcodebuild test \
-project ios/MeasureSDK.xcodeproj \
-scheme MeasureSDK \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
ONLY_ACTIVE_ARCH=YES

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "524CC5B92C6A4B11001AB506"
BuildableName = "MeasureSDK.framework"
BlueprintName = "MeasureSDK"
ReferencedContainer = "container:MeasureSDK.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "524CC5C12C6A4B12001AB506"
BuildableName = "MeasureSDKTests.xctest"
BlueprintName = "MeasureSDKTests"
ReferencedContainer = "container:MeasureSDK.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52BCF2272CB5AA8E003102DF"
BuildableName = "MeasureUITests.xctest"
BlueprintName = "MeasureUITests"
ReferencedContainer = "container:MeasureSDK.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "524CC5B92C6A4B11001AB506"
BuildableName = "MeasureSDK.framework"
BlueprintName = "MeasureSDK"
ReferencedContainer = "container:MeasureSDK.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
78 changes: 78 additions & 0 deletions ios/MeasureSDK.xcodeproj/xcshareddata/xcschemes/TestApp.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52BCF2062CB59FBF003102DF"
BuildableName = "TestApp.app"
BlueprintName = "TestApp"
ReferencedContainer = "container:MeasureSDK.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52BCF2062CB59FBF003102DF"
BuildableName = "TestApp.app"
BlueprintName = "TestApp"
ReferencedContainer = "container:MeasureSDK.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52BCF2062CB59FBF003102DF"
BuildableName = "TestApp.app"
BlueprintName = "TestApp"
ReferencedContainer = "container:MeasureSDK.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* [Custom events](#custom-events)
* [Screen view](#screen-view)
* [Features](#features)
* [Session](#session)
* [Session](#session)

# Minimum requirements

Expand Down

0 comments on commit 0e2f46b

Please sign in to comment.