Include iOS workflows (#34)
2
.github/CODEOWNERS
vendored
@ -8,4 +8,4 @@
|
||||
* @bitwarden/dept-development-mobile
|
||||
|
||||
# DevOps for Actions and other workflow changes
|
||||
.github/workflows @bitwarden/dept-devops
|
||||
# .github/workflows @bitwarden/dept-devops
|
||||
|
||||
36
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build-variant:
|
||||
description: 'Which variant of the app to build'
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- Production
|
||||
build-version:
|
||||
description: 'Optional. Version string to use, in X.Y.Z format. Overrides default in the project.'
|
||||
required: false
|
||||
type: string
|
||||
build-number:
|
||||
description: 'Optional. Build number to use. Overrides default of GitHub run number.'
|
||||
required: false
|
||||
type: number
|
||||
|
||||
env:
|
||||
build-variant: ${{ inputs.build-variant || 'Production' }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build iOS app
|
||||
runs-on: macos-13
|
||||
env:
|
||||
MINT_PATH: .mint/lib
|
||||
MINT_LINK_PATH: .mint/bin
|
||||
steps:
|
||||
- name: Print Environment
|
||||
run: |
|
||||
echo "GitHub ref: $GITHUB_REF"
|
||||
echo "GitHub event: $GITHUB_EVENT"
|
||||
17
.github/workflows/enforce-labels.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Enforce PR labels
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
pull_request:
|
||||
types: [labeled, unlabeled, opened, edited, synchronize]
|
||||
jobs:
|
||||
enforce-label:
|
||||
name: Enforce Label
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Enforce Label
|
||||
uses: yogevbd/enforce-label-action@a3c219da6b8fa73f6ba62b68ff09c469b3a1c024 # 2.2.2
|
||||
with:
|
||||
BANNED_LABELS: "hold,needs-qa"
|
||||
BANNED_LABELS_DESCRIPTION: "PRs with the hold or needs-qa labels cannot be merged"
|
||||
11
.github/workflows/workflow-linter.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Workflow Linter
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/**
|
||||
|
||||
jobs:
|
||||
call-workflow:
|
||||
uses: bitwarden/gh-actions/.github/workflows/workflow-linter.yml@main
|
||||
@ -234,6 +234,11 @@ extension DefaultAppSettingsStore: AppSettingsStore {
|
||||
set { store(newValue, for: .hasSeenWelcomeTutorial) }
|
||||
}
|
||||
|
||||
var migrationVersion: Int {
|
||||
get { fetch(for: .migrationVersion) }
|
||||
set { store(newValue, for: .migrationVersion) }
|
||||
}
|
||||
|
||||
func clearClipboardValue(userId: String) -> ClearClipboardValue {
|
||||
if let rawValue: Int = fetch(for: .clearClipboardValue(userId: userId)),
|
||||
let value = ClearClipboardValue(rawValue: rawValue) {
|
||||
@ -243,12 +248,7 @@ extension DefaultAppSettingsStore: AppSettingsStore {
|
||||
}
|
||||
|
||||
func secretKey(userId: String) -> String? {
|
||||
return fetch(for: .secretKey(userId: userId))
|
||||
}
|
||||
|
||||
var migrationVersion: Int {
|
||||
get { fetch(for: .migrationVersion) }
|
||||
set { store(newValue, for: .migrationVersion) }
|
||||
fetch(for: .secretKey(userId: userId))
|
||||
}
|
||||
|
||||
func setClearClipboardValue(_ clearClipboardValue: ClearClipboardValue?, userId: String) {
|
||||
|
||||
@ -54,6 +54,4 @@ class AuthenticatorItemRepositoryTests: AuthenticatorTestCase {
|
||||
try await subject.addAuthenticatorItem(.fixture())
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Backfill tests
|
||||
}
|
||||
|
||||
@ -56,7 +56,6 @@ protocol AuthenticatorItemService {
|
||||
class DefaultAuthenticatorItemService {
|
||||
// MARK: Properties
|
||||
|
||||
// TODO: Generate this user ID and store it in the keychain?
|
||||
private let defaultUserId = "local"
|
||||
|
||||
/// The data store for persisted items
|
||||
|
||||
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 637 KiB After Width: | Height: | Size: 654 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 76 KiB |
@ -60,7 +60,10 @@ class AuthenticatorItemCoordinator: NSObject, Coordinator, HasStackNavigator {
|
||||
})
|
||||
case let .editAuthenticatorItem(authenticatorItemView):
|
||||
Logger.application.log("Edit item \(authenticatorItemView.id)")
|
||||
showEditAuthenticatorItem(for: authenticatorItemView, delegate: context as? AuthenticatorItemOperationDelegate)
|
||||
showEditAuthenticatorItem(
|
||||
for: authenticatorItemView,
|
||||
delegate: context as? AuthenticatorItemOperationDelegate
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,10 +26,12 @@ final class ManualEntryProcessorTests: AuthenticatorTestCase {
|
||||
}
|
||||
|
||||
/// `receive()` with `.addPressed(:)` navigates to `.addManual(:)`.
|
||||
// func test_receive_addPressed() async {
|
||||
// subject.receive(.addPressed(code: "YouNeedUniqueNewYork", name: "NewYork"))
|
||||
// XCTAssertEqual(coordinator.routes, [.addManual(key: "YouNeedUniqueNewYork", name: "NewYork")])
|
||||
// }
|
||||
func test_receive_addPressed() async {
|
||||
subject.state.authenticatorKey = "YouNeedUniqueNewYork"
|
||||
subject.state.name = "NewYork"
|
||||
subject.receive(.addPressed(code: "YouNeedUniqueNewYork", name: "NewYork"))
|
||||
XCTAssertEqual(coordinator.routes, [.addManual(key: "YouNeedUniqueNewYork", name: "NewYork")])
|
||||
}
|
||||
|
||||
/// `receive()` with `.authenticatorKeyChanged(:)` updates the state.
|
||||
func test_receive_authenticatorKeyChanged() async {
|
||||
|
||||
11
Dangerfile
@ -1,15 +1,12 @@
|
||||
xcode_summary.ignored_files = '**/SourcePackages/*'
|
||||
xcode_summary.report 'build/BitwardenTests.xcresult'
|
||||
xcode_summary.report 'build/SuthenticatorTests.xcresult'
|
||||
|
||||
slather.configure(
|
||||
'Bitwarden.xcodeproj', 'Bitwarden',
|
||||
'Authenticator.xcodeproj', 'Authenticator',
|
||||
options: {
|
||||
binary_basename: [
|
||||
'Bitwarden',
|
||||
#'BitwardenActionExtension', -- Can't add this until the target has some lines of code or slather throws an error.
|
||||
'BitwardenAutoFillExtension',
|
||||
'BitwardenShareExtension',
|
||||
'BitwardenShared',
|
||||
'Authenticator',
|
||||
'BitwardenAuthenticatorShared',
|
||||
'Networking',
|
||||
],
|
||||
build_directory: 'build/DerivedData',
|
||||
|
||||