Repository navigation
Unit tests and refactoring to make it testable #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
af84087
d2dc58e
ae61c9f
625163b
9e12d79
3bc8be0
738246f
def34ed
6507087
102f292
7f379b3
f30bb90
6b1222e
6a8ae89
d0bead5
8ab584b
ab457e5
7ad32eb
727777c
2891d3c
d93351b
9dcb845
4b020d8
8220e3c
d4cf286
c59b563
aea9e42
638fdaf
188d93f
fb71871
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Build Examples | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - main | ||
| - v3.0.0 | ||
| pull_request: | ||
| jobs: | ||
| build: | ||
| runs-on: macos-13 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: maxim-lobanov/setup-xcode@v1 | ||
| with: | ||
| xcode-version: '15.0' | ||
| - name: Build Example | ||
| run: make buildExample | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Tests | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - main | ||
| - v3.0.0 | ||
| pull_request: | ||
| jobs: | ||
| test: | ||
| runs-on: macos-13 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: maxim-lobanov/setup-xcode@v1 | ||
| with: | ||
| xcode-version: '15.0' | ||
| - name: Test SDK | ||
| run: make test |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,9 @@ let package = Package( | |
| ], | ||
| dependencies: [ | ||
| // Dependencies declare other packages that this package depends on. | ||
| .package(url: "https://github.com/Quick/Quick.git", from: "6.0.0"), | ||
| .package(url: "https://github.com/Quick/Nimble.git", from: "12.0.0"), | ||
| .package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", from: "9.0.0"), | ||
| ], | ||
| targets: [ | ||
| // Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
|
|
@@ -25,7 +28,13 @@ let package = Package( | |
| ), | ||
| .testTarget( | ||
| name: "PostHogTests", | ||
| dependencies: ["PostHog"], | ||
| dependencies: [ | ||
| "PostHog", | ||
| "Quick", | ||
| "Nimble", | ||
| "OHHTTPStubs", | ||
| .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs"), | ||
| ], | ||
|
Comment on lines
+31
to
+37
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is what had to be done to make it work in CI, in combination with
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Xcode already defines those dependencies as SPM in its projects, but apparently, CI wasn't picking them up, maybe a Xcode version mismatch, an empty project worked just fine. |
||
| path: "PostHogTests" | ||
| ), | ||
| ] | ||
|
|
||
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.