Skip to content

Commit

Permalink
Merge pull request #5 from wildlink/kkurz/github-actions
Browse files Browse the repository at this point in the history
Wildlink API v2.0.0
  • Loading branch information
kylekurz authored Oct 13, 2021
2 parents 23f51ca + e4390a2 commit 32a1b18
Show file tree
Hide file tree
Showing 42 changed files with 1,762 additions and 655 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
BUNDLE_PATH: "vendor"
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @wildlink/ios
67 changes: 67 additions & 0 deletions .github/workflows/actions-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI Publish
on:
push:
tags:
- '*'

jobs:
pod-lint:
runs-on: macos-11
steps:
- name: Select Xcode 13
uses: devbotsxyz/xcode-select@v1
with:
version: "13"
- name: Check out repository
uses: actions/checkout@v2
- name: Cache CocoaPods data
uses: actions/cache@v2
with:
path: Example/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Run pod lib lint
run: |
bundle install
bundle exec fastlane lint
unit-tests:
runs-on: macos-11
needs: pod-lint
steps:
- name: Select Xcode 13
uses: devbotsxyz/xcode-select@v1
with:
version: "13"
- name: Check out repository
uses: actions/checkout@v2
- name: Cache CocoaPods data
uses: actions/cache@v2
with:
path: Example/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Run the unit tests
run: |
bundle install
bundle exec fastlane test
# Since this runs free on hosted runners, don't optimize for minimum
# runtime. Instead, make sure we never publish something that doesn't
# pass both lint and unit testing, even after merges.
publish:
runs-on: macOS-11
needs: unit-tests
steps:
- name: Select Xcode 13
uses: devbotsxyz/xcode-select@v1
with:
version: "13"
- name: Check out repository
uses: actions/checkout@v2
- name: Publish to CocoaPods trunk
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
bundle install
bundle exec fastlane publish
44 changes: 44 additions & 0 deletions .github/workflows/actions-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: GitHub Actions CI
on: [push]
jobs:
pod-lint:
runs-on: macos-11
steps:
- name: Select Xcode 13
uses: devbotsxyz/xcode-select@v1
with:
version: "13"
- name: Check out repository
uses: actions/checkout@v2
- name: Cache CocoaPods data
uses: actions/cache@v2
with:
path: Example/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Run pod lib lint
run: |
bundle install
bundle exec fastlane lint
unit-tests:
runs-on: macos-11
needs: pod-lint
steps:
- name: Select Xcode 13
uses: devbotsxyz/xcode-select@v1
with:
version: "13"
- name: Check out repository
uses: actions/checkout@v2
- name: Cache CocoaPods data
uses: actions/cache@v2
with:
path: Example/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Run the unit tests
run: |
bundle install
bundle exec fastlane test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

**/.DS_Store

vendor
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"proseWrap": "always",
"arrowParens": "always",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all"
}
8 changes: 8 additions & 0 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ target 'Wildlink_Example' do
pod 'Wildlink', :path => '../', :testspecs => ['Tests']
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
end
end
37 changes: 28 additions & 9 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
PODS:
- Alamofire (4.8.2)
- Wildlink (1.0.6):
- Alamofire (~> 4.8.2)
- Wildlink/Tests (1.0.6):
- Alamofire (~> 4.8.2)
- Alamofire (5.4.4)
- OHHTTPStubs (9.1.0):
- OHHTTPStubs/Default (= 9.1.0)
- OHHTTPStubs/Core (9.1.0)
- OHHTTPStubs/Default (9.1.0):
- OHHTTPStubs/Core
- OHHTTPStubs/JSON
- OHHTTPStubs/NSURLSession
- OHHTTPStubs/OHPathHelpers
- OHHTTPStubs/JSON (9.1.0):
- OHHTTPStubs/Core
- OHHTTPStubs/NSURLSession (9.1.0):
- OHHTTPStubs/Core
- OHHTTPStubs/OHPathHelpers (9.1.0)
- OHHTTPStubs/Swift (9.1.0):
- OHHTTPStubs/Default
- Wildlink (2.0.0):
- Alamofire (~> 5.4.4)
- Wildlink/Tests (2.0.0):
- Alamofire (~> 5.4.4)
- OHHTTPStubs (~> 9.1.0)
- OHHTTPStubs/Swift (~> 9.1.0)

DEPENDENCIES:
- Wildlink (from `../`)
Expand All @@ -12,15 +29,17 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- Alamofire
- OHHTTPStubs

EXTERNAL SOURCES:
Wildlink:
:path: "../"

SPEC CHECKSUMS:
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
Wildlink: 1698c8bde239ea342722aa7633b851354e3f530f
Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9
OHHTTPStubs: 90eac6d8f2c18317baeca36698523dc67c513831
Wildlink: 675f527710f13d09b44a7681349eb224cc8789f4

PODFILE CHECKSUM: ebc74e7f624558182cd7f10e0ae346ced9843b6a
PODFILE CHECKSUM: e82b0dfe349c98fec62bc27a250c046f2ccedf50

COCOAPODS: 1.8.4
COCOAPODS: 1.11.2
8 changes: 8 additions & 0 deletions Example/Wildlink.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
9BD439F3270F8F0200A476D9 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BD439F2270F8F0200A476D9 /* Constants.swift */; };
9BD439F4270F8F0900A476D9 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BD439F2270F8F0200A476D9 /* Constants.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -44,6 +46,8 @@
7789AF2650C0A232C4B5F607 /* Pods-Wildlink_Example-Wildlink_ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wildlink_Example-Wildlink_ExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Wildlink_Example-Wildlink_ExampleTests/Pods-Wildlink_Example-Wildlink_ExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
7A0238D73297FC83C4EE233B /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
807ECB05FF0DE7F330B29B79 /* Pods-Wildlink_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wildlink_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Wildlink_Example/Pods-Wildlink_Example.debug.xcconfig"; sourceTree = "<group>"; };
9BC1A843270BA31600A1AC18 /* Wildlink.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = Wildlink.xctestplan; sourceTree = "<group>"; };
9BD439F2270F8F0200A476D9 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
9E71604798F2009321675667 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
C63CEDC72C5FAE02F609F824 /* Pods-Wildlink_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wildlink_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Wildlink_Example/Pods-Wildlink_Example.release.xcconfig"; sourceTree = "<group>"; };
FBC867498DEB3E16D4821594 /* Pods-Wildlink_Example-Wildlink_ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Wildlink_Example-Wildlink_ExampleTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Wildlink_Example-Wildlink_ExampleTests/Pods-Wildlink_Example-Wildlink_ExampleTests.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -101,6 +105,7 @@
607FACC71AFB9204008FA782 = {
isa = PBXGroup;
children = (
9BC1A843270BA31600A1AC18 /* Wildlink.xctestplan */,
607FACF51AFB993E008FA782 /* Podspec Metadata */,
607FACD21AFB9204008FA782 /* Example for Wildlink */,
02A0F22A22D43ABA00979F78 /* Wildlink_ExampleTests */,
Expand All @@ -123,6 +128,7 @@
isa = PBXGroup;
children = (
607FACD51AFB9204008FA782 /* AppDelegate.swift */,
9BD439F2270F8F0200A476D9 /* Constants.swift */,
607FACD71AFB9204008FA782 /* ViewController.swift */,
607FACD91AFB9204008FA782 /* Main.storyboard */,
607FACDC1AFB9204008FA782 /* Images.xcassets */,
Expand Down Expand Up @@ -344,6 +350,7 @@
buildActionMask = 2147483647;
files = (
02A0F22C22D43ABA00979F78 /* Wildlink_ExampleTests.swift in Sources */,
9BD439F4270F8F0900A476D9 /* Constants.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -353,6 +360,7 @@
files = (
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */,
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
9BD439F3270F8F0200A476D9 /* Constants.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,23 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Wildlink_Example.app"
BlueprintName = "Wildlink_Example"
ReferencedContainer = "container:Wildlink.xcodeproj">
</BuildableReference>
</MacroExpansion>
<TestPlans>
<TestPlanReference
reference = "container:Wildlink.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -68,17 +83,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "Wildlink_Example.app"
BlueprintName = "Wildlink_Example"
ReferencedContainer = "container:Wildlink.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -100,8 +104,6 @@
ReferencedContainer = "container:Wildlink.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
40 changes: 40 additions & 0 deletions Example/Wildlink.xctestplan
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"configurations" : [
{
"id" : "27F6A6F5-53A7-4B8F-B102-39477FD44CA2",
"name" : "Configuration 1",
"options" : {

}
}
],
"defaultOptions" : {
"codeCoverage" : {
"targets" : [
{
"containerPath" : "container:Pods\/Pods.xcodeproj",
"identifier" : "125C2A8B44D3BE9F6DDE2F72FB819783",
"name" : "Wildlink"
}
]
},
"testExecutionOrdering" : "random"
},
"testTargets" : [
{
"target" : {
"containerPath" : "container:Pods\/Pods.xcodeproj",
"identifier" : "CC780152B3021C7D84397BE1FA27DEDD",
"name" : "Wildlink-Unit-Tests"
}
},
{
"target" : {
"containerPath" : "container:Wildlink.xcodeproj",
"identifier" : "02A0F22822D43ABA00979F78",
"name" : "Wildlink_ExampleTests"
}
}
],
"version" : 1
}
3 changes: 1 addition & 2 deletions Example/Wildlink/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

//initialize wildlink
Wildlink.shared.delegate = self
let defaults = UserDefaults.standard
Wildlink.shared.initialize(appId: "APP_ID", appSecret: "APP_SECRET", wildlinkDeviceToken: defaults.string(forKey: "wildlinkDeviceToken"), wildlinkDeviceKey: defaults.string(forKey: "wildlinkDeviceKey"))
Wildlink.shared.initialize(appId: Constants.appId, appSecret: Constants.appSecret, wildlinkDeviceToken: defaults.string(forKey: "wildlinkDeviceToken"), wildlinkDeviceKey: defaults.string(forKey: "wildlinkDeviceKey"))

return true
}
Expand Down
14 changes: 14 additions & 0 deletions Example/Wildlink/Constants.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Constants.swift
// Wildlink_Example
//
// Created by Kyle Kurz - Wildfire on 10/7/21.
// Copyright © 2021 CocoaPods. All rights reserved.
//

import Foundation

struct Constants {
static let appId = "<APP_ID>"
static let appSecret = "<APP_SECRET>"
}
Loading

0 comments on commit 32a1b18

Please sign in to comment.