Comments (4)
Checking it in is the simplest option to pin the binary, but you can also download it or build it from source. For example, you could add a build phase that downloads the binary from the GitHub release artifacts (making sure to set the input and output files accordingly) which is basically what Cuckoo does with their run
script.
set -eu
version=0.16.0
curl -Lo Mockingbird-cisafe.zip "https://github.com/birdrides/mockingbird/releases/download/${version}/Mockingbird-cisafe.zip"
unzip -o Mockingbird-cisafe.zip mockingbird
I do agree that this could be improved a bitβeither in terms of better docs or having a built-in way of pinning binaries.
from mockingbird.
I use CocoaPods and got it running on CI.
In the Test target "Generate Mockingbird Mocks" script, I had to change this:
set -e
mockingbird generate \
--targets 'ArchitecturePlayground' \
--outputs "${SRCROOT}/MockingbirdMocks/ArchitecturePlaygroundTests-ArchitecturePlaygroundMocks.generated.swift" \
--support "${SRCROOT}/MockingbirdSupport"
# Ensure mocks are generated prior to running Compile Sources
rm -f '/tmp/Mockingbird-1130FD7D-40A7-4135-91F0-E30948B4CF3D'
To:
set -e
"${SRCROOT}/Pods/MockingbirdFramework/mockingbird" generate \
--targets 'ArchitecturePlayground' \
--outputs "${SRCROOT}/MockingbirdMocks/ArchitecturePlaygroundTests-ArchitecturePlaygroundMocks.generated.swift" \
--support "${SRCROOT}/MockingbirdSupport"
# Ensure mocks are generated prior to running Compile Sources
rm -f '/tmp/Mockingbird-1130FD7D-40A7-4135-91F0-E30948B4CF3D'
Of course this only works if the binary was retrieved via Pods π
from mockingbird.
the fact that you need to version a 35mb binary to your git (for your CI to run) is a real dealbreaker for me
I use CocoaPods and exclude the Pods
folder in .gitignore
. So the big binary is not in source control.
from mockingbird.
@menjoo thanks for the tip I'll give it a try π
from mockingbird.
Related Issues (20)
- any keyword seems not supported
- How to run tests without host app? HOT 1
- warning: no calls to throwing functions occur within 'try'
- forwardCallsToSuper on class method
- Generator fails to create mock for the simplest PAT
- Missing or confusing documentation HOT 1
- Unable to stub closure in static function HOT 1
- Mocking URLSession with different URL parameters and responses
- Mock generator ignores class-only protocols HOT 3
- Exception on line with given on MacOS 13.2 and XCode 14.2 HOT 3
- Is mockingbird still being maintained?? HOT 2
- Unable to resolve inherited type 'AnyObject' HOT 3
- Mock doesn't work when created in setup method HOT 1
- Mock async and throwing properties
- Excluding file mechanism not working (on a custom Swift Package) HOT 3
- Mockingbird doesn't work out of the box on new projects and Xcode 15 due to sandboxing
- Always getting "Use of protocol 'CaseIterableDefaultsLast' as a type must be written 'any CaseIterableDefaultsLast'" Compiler Error
- Privacy Manifest
- Not generating any mocks results
- 'mock' is unavailable when mocking public protocols from other module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mockingbird.