-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code and tests for YAnalytics Firebase
- Loading branch information
Mark Pospesel
committed
Feb 22, 2023
1 parent
62ba457
commit 1e2a62f
Showing
18 changed files
with
991 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Run Jazzy | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push events but only for the main branch | ||
push: | ||
branches: [ main ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "deploy_docs" | ||
deploy_docs: | ||
# The type of runner that the job will run on | ||
runs-on: macos-12 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v1 | ||
- name: Publish Jazzy Docs | ||
uses: steven0351/publish-jazzy-docs@v1 | ||
with: | ||
personal_access_token: ${{ secrets.ACCESS_TOKEN }} | ||
config: .jazzy.yaml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Run linter and unit tests | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-12 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Xcode version | ||
run: | | ||
ls -l /Applications | grep 'Xcode' | ||
sudo xcode-select -s /Applications/Xcode_14.0.1.app | ||
- name: Lint code using SwiftLint | ||
run: swiftlint --strict --reporter github-actions-logging | ||
|
||
- name: Build iOS | ||
run: | | ||
xcodebuild -scheme YAnalyticsFirebase -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' build-for-testing | ||
- name: Run tests iOS | ||
run: | | ||
xcodebuild -scheme YAnalyticsFirebase -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' test-without-building |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
author: 'Y Media Labs' | ||
author_url: https://yml.co | ||
min_acl: public | ||
hide_documentation_coverage: false | ||
theme: fullwidth | ||
output: ./docs | ||
documentation: ./*.md | ||
swift_build_tool: xcodebuild | ||
module: YAnalyticsFirebase | ||
xcodebuild_arguments: | ||
- -scheme | ||
- YAnalyticsFirebase | ||
- -sdk | ||
- iphonesimulator | ||
- -destination | ||
- 'platform=iOS Simulator,name=iPhone 13' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version: 1 | ||
external_links: | ||
documentation: "https://yml-org.github.io/yanalytics-firebase-ios/" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# By default, SwiftLint uses a set of sensible default rules you can adjust: | ||
disabled_rules: # rule identifiers turned on by default to exclude from running | ||
|
||
- multiple_closures_with_trailing_closure | ||
|
||
opt_in_rules: # some rules are turned off by default, so you need to opt-in | ||
- contains_over_first_not_nil | ||
- empty_count | ||
- first_where | ||
- force_unwrapping | ||
- implicit_return | ||
- missing_docs | ||
- multiline_arguments | ||
- multiline_arguments_brackets | ||
- multiline_function_chains | ||
- multiline_literal_brackets | ||
- multiline_parameters | ||
- multiline_parameters_brackets | ||
- operator_whitespace | ||
- prohibited_interface_builder | ||
- unneeded_parentheses_in_closure_argument | ||
- vertical_whitespace_closing_braces | ||
- vertical_whitespace_opening_braces | ||
|
||
excluded: # paths to ignore during linting. Takes precedence over `included`. | ||
- Pods | ||
- docs | ||
- .build | ||
|
||
# configurable rules can be customized from this configuration file | ||
# binary rules can set their severity level | ||
|
||
cyclomatic_complexity: | ||
ignores_case_statements: true | ||
|
||
identifier_name: | ||
min_length: 1 | ||
|
||
trailing_whitespace: | ||
ignores_empty_lines: true | ||
|
||
function_parameter_count: | ||
warning: 6 |
107 changes: 107 additions & 0 deletions
107
.swiftpm/xcode/xcshareddata/xcschemes/YAnalyticsFirebase.xcscheme
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1420" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "YAnalyticsFirebase_YAnalyticsFirebaseTests" | ||
BuildableName = "YAnalyticsFirebase_YAnalyticsFirebaseTests" | ||
BlueprintName = "YAnalyticsFirebase_YAnalyticsFirebaseTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "YAnalyticsFirebase" | ||
BuildableName = "YAnalyticsFirebase" | ||
BlueprintName = "YAnalyticsFirebase" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "YAnalyticsFirebaseTests" | ||
BuildableName = "YAnalyticsFirebaseTests" | ||
BlueprintName = "YAnalyticsFirebaseTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
codeCoverageEnabled = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO" | ||
testExecutionOrdering = "random"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "YAnalyticsFirebaseTests" | ||
BuildableName = "YAnalyticsFirebaseTests" | ||
BlueprintName = "YAnalyticsFirebaseTests" | ||
ReferencedContainer = "container:"> | ||
</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 = "YAnalyticsFirebase_YAnalyticsFirebaseTests" | ||
BuildableName = "YAnalyticsFirebase_YAnalyticsFirebaseTests" | ||
BlueprintName = "YAnalyticsFirebase_YAnalyticsFirebaseTests" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## Introduction ## | ||
|
||
In layman's terms, provide a brief introduction to the issue. No more than 3 sentences. | ||
|
||
## Purpose ## | ||
|
||
Explain the purpose of this pull request. Include a link to the issue being addressed. | ||
|
||
## Scope ## | ||
|
||
Detail the scope of the pull request, i.e. what changed. | ||
|
||
// Optional sections | ||
|
||
## Discussion ## | ||
|
||
Any discussion about approach, challenges, etc. that you feel is relevant. | ||
|
||
## Out of Scope ## | ||
|
||
Call out any known issues that are purposely not addressed in this pull request. | ||
|
||
## 📱 Screenshots ## | ||
|
||
For UI work, please include before/after screenshots hosted in a 2-column table for easy side-by-side comparison. | ||
|
||
## 🎬 Video ## | ||
|
||
Same as Screenshots above. | ||
|
||
## 📈 Coverage ## | ||
|
||
##### Code ##### | ||
|
||
Include a snapshot of the Code Coverage report generated when you ran the full unit test suite. | ||
|
||
##### Documentation ##### | ||
|
||
Include a snapshot of the documentation coverage report when you ran jazzy locally to generate documentation. We require 100% documentation coverage of all `public` interfaces. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// swift-tools-version: 5.7 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "YAnalyticsFirebase", | ||
platforms: [ | ||
.iOS(.v14) | ||
], | ||
products: [ | ||
.library( | ||
name: "YAnalyticsFirebase", | ||
targets: ["YAnalyticsFirebase"] | ||
) | ||
], | ||
dependencies: [ | ||
.package( | ||
url: "https://github.com/yml-org/yanalytics-ios.git", | ||
from: "1.1.0" | ||
), | ||
.package( | ||
url: "https://github.com/firebase/firebase-ios-sdk.git", | ||
.upToNextMajor(from: "10.4.0") | ||
) | ||
], | ||
targets: [ | ||
.target( | ||
name: "YAnalyticsFirebase", | ||
dependencies: [ | ||
.product(name: "YAnalytics", package: "yanalytics-ios"), | ||
.product(name: "FirebaseAnalytics", package: "firebase-ios-sdk") | ||
] | ||
), | ||
.testTarget( | ||
name: "YAnalyticsFirebaseTests", | ||
dependencies: ["YAnalyticsFirebase"], | ||
resources: [.process("Resources")] | ||
) | ||
] | ||
) |
Oops, something went wrong.