mirror of
https://github.com/aptabase/aptabase-swift.git
synced 2026-01-16 22:11:17 +01:00
Add GitHub Action + multiplatform tests (#11)
This commit is contained in:
committed by
GitHub
parent
539e7e9c5b
commit
32edd8ad22
31
.github/workflows/ci.yaml
vendored
31
.github/workflows/ci.yaml
vendored
@@ -8,20 +8,29 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Swift ${{ matrix.swift }}
|
||||
runs-on: macos-latest
|
||||
name: ${{ matrix.platform }} on Xcode ${{ matrix.xcode }}
|
||||
runs-on: macos-13
|
||||
strategy:
|
||||
matrix:
|
||||
swift: ["5.6", "5.7", "5.8", "5.9"]
|
||||
platform: [macOS, iOS, tvOS, watchOS]
|
||||
xcode: [^14] # ^15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: swift-actions/setup-swift@v1
|
||||
|
||||
- name: Xcode Build
|
||||
uses: mxcl/xcodebuild@v1
|
||||
with:
|
||||
swift-version: ${{ matrix.swift }}
|
||||
xcode: ${{ matrix.xcode }}
|
||||
platform: ${{ matrix.platform }}
|
||||
action: build
|
||||
configuration: debug
|
||||
scheme: Aptabase
|
||||
|
||||
- name: Build
|
||||
run: swift build
|
||||
|
||||
- name: Run tests
|
||||
run: swift test
|
||||
- name: Xcode Test
|
||||
uses: mxcl/xcodebuild@v1
|
||||
with:
|
||||
xcode: ${{ matrix.xcode }}
|
||||
platform: ${{ matrix.platform }}
|
||||
action: test
|
||||
configuration: debug
|
||||
scheme: AptabaseTests
|
||||
@@ -1,6 +1,6 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'Aptabase'
|
||||
s.version = '0.2.3'
|
||||
s.version = '0.3.2'
|
||||
s.summary = 'Swift SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps'
|
||||
s.homepage = 'https://aptabase.com'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
|
||||
@@ -12,7 +12,7 @@ import TVUIKit
|
||||
|
||||
/// The Aptabase client used to track events.
|
||||
public class Aptabase: NSObject {
|
||||
private static var sdkVersion = "aptabase-swift@0.3.0";
|
||||
private static var sdkVersion = "aptabase-swift@0.3.2";
|
||||
|
||||
private var env = EnvironmentInfo.current()
|
||||
private var client: AptabaseClient?
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Foundation
|
||||
|
||||
internal class AptabaseClient {
|
||||
private static let sdkVersion = "aptabase-swift@0.3.0";
|
||||
private static let sdkVersion = "aptabase-swift@0.3.2";
|
||||
// Session expires after 1 hour of inactivity
|
||||
private static let sessionTimeout: TimeInterval = 1 * 60 * 60
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ protocol URLSessionProtocol {
|
||||
|
||||
extension URLSession: URLSessionProtocol {}
|
||||
|
||||
|
||||
public class EventDispatcher {
|
||||
private var events = ConcurrentQueue<Event>()
|
||||
private let MAX_BATCH_SIZE = 25
|
||||
|
||||
Reference in New Issue
Block a user