Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Add yarn commands #21

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
run: brew install swift-format xcbeautify

- name: Run formatter 🎨
run: swift-format format -i -r ./**/**/*.swift --configuration swift-format-config.json
run: yarn format

- name: Run lint 👀
run: swift-format lint -r -s ./**/**/*.swift --configuration swift-format-config.json
run: yarn lint

- name: Generate mocks 🫥
run: swift package update Mockingbird && ./gen-mocks.sh
run: yarn mocks

- name: Run tests 💀
run: set -o pipefail && xcodebuild -scheme FishjamClientTests test -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" | xcbeautify
run: yarn test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ iOSInjectionProject/


node_modules
yarn-error.log

FishjamClientDemo/Debug.xcconfig

Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@
"devDependencies": {
"@release-it/bumper": "^4.0.0",
"release-it": "^15.5.0"
},
"scripts": {
"prepare": "./scripts/init.sh",
"lint": "swift-format lint -r -s ./**/**/*.swift --configuration swift-format-config.json",
"format": "swift-format format -r -i ./**/**/*.swift --configuration swift-format-config.json",
"test": "set -o pipefail && xcodebuild -scheme FishjamClientTests test -destination \"platform=iOS Simulator,name=iPhone 14,OS=latest\" | xcbeautify",
"mocks": "swift package update Mockingbird && ./scripts/gen-mocks.sh"
}
}
}
223 changes: 223 additions & 0 deletions project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
{
"dependencies" : [
{
"identity" : "specs",
"requirement" : {
"exact" : [
"114.5735.8"
]
},
"type" : "sourceControl",
"url" : "https://github.com/webrtc-sdk/Specs.git"
},
{
"identity" : "swift-protobuf",
"requirement" : {
"range" : [
{
"lower_bound" : "1.18.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-protobuf.git"
},
{
"identity" : "starscream",
"requirement" : {
"range" : [
{
"lower_bound" : "4.0.0",
"upper_bound" : "5.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/daltoniam/Starscream.git"
},
{
"identity" : "mockingbird",
"requirement" : {
"range" : [
{
"lower_bound" : "0.20.0",
"upper_bound" : "0.21.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/birdrides/mockingbird.git"
},
{
"identity" : "promises",
"requirement" : {
"range" : [
{
"lower_bound" : "2.0.0",
"upper_bound" : "3.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/google/promises.git"
},
{
"identity" : "swiftphoenixclient",
"requirement" : {
"range" : [
{
"lower_bound" : "5.0.0",
"upper_bound" : "6.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/davidstump/SwiftPhoenixClient.git"
},
{
"identity" : "swift-log",
"requirement" : {
"range" : [
{
"lower_bound" : "1.4.2",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-log.git"
},
{
"identity" : "swift-docc-plugin",
"requirement" : {
"range" : [
{
"lower_bound" : "1.0.0",
"upper_bound" : "2.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/apple/swift-docc-plugin"
}
],
"manifest_display_name" : "FishjamClient",
"name" : "FishjamClient",
"path" : "/Users/mpawlik/Projects/jellyfish/ios-client-sdk",
"platforms" : [
{
"name" : "ios",
"version" : "13.0"
}
],
"products" : [
{
"name" : "FishjamClient",
"targets" : [
"FishjamClient"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "FishjamClientTests",
"module_type" : "SwiftTarget",
"name" : "FishjamClientTests",
"path" : "Tests/FishjamClientTests",
"product_dependencies" : [
"Mockingbird"
],
"sources" : [
"FishjamClientMocks/JellyfishClientSdkMocks.generated.swift",
"FishjamClientTests.swift",
"PeerConnectionManagerTest.swift"
],
"target_dependencies" : [
"FishjamClient"
],
"type" : "test"
},
{
"c99name" : "FishjamClient",
"module_type" : "SwiftTarget",
"name" : "FishjamClient",
"path" : "Sources",
"product_dependencies" : [
"WebRTC",
"SwiftProtobuf",
"Promises",
"SwiftPhoenixClient",
"Starscream",
"FBLPromises",
"Logging"
],
"product_memberships" : [
"FishjamClient"
],
"sources" : [
"FishjamClient/FishjamClient.swift",
"FishjamClient/FishjamClientInternal.swift",
"FishjamClient/FishjamClientListener.swift",
"FishjamClient/TestUtils.swift",
"FishjamClient/protos/fishjam/peer_notifications.pb.swift",
"MembraneRTC/Constants.swift",
"MembraneRTC/EventTransport/EventTransport.swift",
"MembraneRTC/EventTransport/PhoenixTransport.swift",
"MembraneRTC/Events/Event.swift",
"MembraneRTC/IPC/IPC.swift",
"MembraneRTC/IPC/broadcast_ipc.pb.swift",
"MembraneRTC/Media/BroadcastSampleSource.swift",
"MembraneRTC/Media/Capturers/CameraCapturer.swift",
"MembraneRTC/Media/Capturers/FileCapturer.swift",
"MembraneRTC/Media/Capturers/ScreenBroadcastCapturer.swift",
"MembraneRTC/Media/Capturers/ScreenCapturer.swift",
"MembraneRTC/Media/Capturers/VideoCapturer.swift",
"MembraneRTC/Media/Dimensions.swift",
"MembraneRTC/Media/ScreenBroadcastNotificationReceiver.swift",
"MembraneRTC/Media/SoundDetection.swift",
"MembraneRTC/Media/Tracks/AudioTrack.swift",
"MembraneRTC/Media/Tracks/LocalAudioTrack.swift",
"MembraneRTC/Media/Tracks/LocalScreenBroadcastTrack.swift",
"MembraneRTC/Media/Tracks/LocalTrack.swift",
"MembraneRTC/Media/Tracks/LocalVideoTrack.swift",
"MembraneRTC/Media/Tracks/MediaTrackProvider.swift",
"MembraneRTC/Media/Tracks/RemoteAudioTrack.swift",
"MembraneRTC/Media/Tracks/RemoteTrack.swift",
"MembraneRTC/Media/Tracks/RemoteVideoTrack.swift",
"MembraneRTC/Media/Tracks/VideoTrack.swift",
"MembraneRTC/Media/VideoParameters.swift",
"MembraneRTC/MembraneRTC.swift",
"MembraneRTC/MembraneRTCDelegate.swift",
"MembraneRTC/PeerConnectionFactoryWrapper.swift",
"MembraneRTC/PeerConnectionListener.swift",
"MembraneRTC/PeerConnectionManager.swift",
"MembraneRTC/RTCEngineCommunication.swift",
"MembraneRTC/RTCEngineListener.swift",
"MembraneRTC/Types/AnyJson.swift",
"MembraneRTC/Types/Encoder.swift",
"MembraneRTC/Types/EncodingReason.swift",
"MembraneRTC/Types/Endpoint.swift",
"MembraneRTC/Types/Metadata.swift",
"MembraneRTC/Types/RTCStats.swift",
"MembraneRTC/Types/SerializedMediaEvent.swift",
"MembraneRTC/Types/SimulcastConfig.swift",
"MembraneRTC/Types/TrackBandwidthLimit.swift",
"MembraneRTC/Types/TrackContext.swift",
"MembraneRTC/Types/TrackData.swift",
"MembraneRTC/Types/VadStatus.swift",
"MembraneRTC/UI/SwiftUIVideoView.swift",
"MembraneRTC/UI/VideoView.swift",
"MembraneRTC/Utilities/MulticastDelegate.swift",
"MembraneRTC/Utilities/SimulcastUtils.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
File renamed without changes.
2 changes: 1 addition & 1 deletion gen-mocks.sh → scripts/gen-mocks.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
set -eu
cd "$(dirname "$0")"
cd "$(dirname "$0")/.."
swift package describe --type json > project.json
.build/checkouts/mockingbird/mockingbird generate --project project.json \
--output-dir Tests/FishjamClientTests/FishjamClientMocks \
Expand Down
3 changes: 1 addition & 2 deletions scripts/init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
brew install swift-format
yarn
brew install swift-format xcbeautify
chmod +x .githooks/*
cp .githooks/* .git/hooks
cp FishjamClientDemo/Release.xcconfig FishjamClientDemo/Debug.xcconfig
Loading