Skip to content

Commit

Permalink
CI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewc committed Apr 19, 2024
1 parent efb16fc commit 2bf8c71
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_test_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
SOURCE_BRANCH: ${{ github.head_ref }}
spm-build:
spm-test:
needs: unit-test
runs-on: macos-13
timeout-minutes: 20
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
bundler-cache: true
- name: Build SPM App
run: |
bundle exec fastlane build_spm
bundle exec fastlane test_spm
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions .swiftpm/xcode/xcshareddata/xcschemes/PrimerSDKTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
Expand Down
30 changes: 14 additions & 16 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ platform :ios do
podfile: podfile_path
)

run_tests(workspace: app_workspace,
run_tests(workspace: app_workspace,
scheme: "Debug App Tests",
destination: "platform=iOS Simulator,name=iPhone 14 Pro",
xcargs: "EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64",
Expand Down Expand Up @@ -112,18 +112,16 @@ platform :ios do
end

desc 'This action builds the app using the SPM integration'
lane :build_spm do
lane :test_spm do
common_pre_build_action
build_app(workspace: app_workspace,
scheme: spm_app_scheme,
sdk: "iphonesimulator",
configuration: "Debug",
destination: "generic/platform=iOS Simulator",
xcargs: "EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64",
export_method: "development",
skip_package_ipa: true,
skip_package_pkg: true
)
run_tests(
package_path: ".",
scheme: "PrimerSDKTests",
sdk: "iphonesimulator17.4",
destination: "OS=17.4,name=iPhone 15 Pro",
test_without_building: true
# xcargs: "EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64",
)
end

lane :build_cocoapods do |options|
Expand Down Expand Up @@ -153,7 +151,7 @@ platform :ios do
skip_package_dependencies_resolution: true
)
end

desc 'This action runs Unit Tests, builds the app and uploads it to Appetize'
lane :appetize_build_and_upload do |options|

Expand Down Expand Up @@ -184,7 +182,7 @@ platform :ios do
public_key: public_key,
note: sdk_version_name_source_branch
)

update_deployment_url(lane_context[SharedValues::APPETIZE_APP_URL])
update_livedemostore_url("https://livedemostore.common.primer.io/ios/#{url_end}")

Expand Down Expand Up @@ -244,7 +242,7 @@ platform :ios do
# The build is identified by the contents of CFBundleVersion in Info.plist

version_name = get_appetize_version_name(build_type, pr_number)

set_info_plist_value(path: info_plist_path, key: "CFBundleVersion", value: version_name)
set_info_plist_value(path: info_plist_path, key: "CFBundleShortVersionString", value: "#{version_name}")
end
Expand All @@ -267,7 +265,7 @@ platform :ios do
return "preview_#{pr_number}"
end
end

def update_deployment_url(pub_url)
sh("echo APPETIZE_APP_URL=#{pub_url} >> $GITHUB_ENV")
end
Expand Down

0 comments on commit 2bf8c71

Please sign in to comment.