From c636d4329b1e95c71703ed8681495051ffe5a927 Mon Sep 17 00:00:00 2001 From: map Date: Thu, 9 Jan 2025 14:13:53 +0100 Subject: [PATCH 1/5] minor fixes --- packages/node-mimimi/src/importer_api.rs | 3 ++- .../desktop/mailimport/DesktopMailImportFacade.ts | 13 ++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/node-mimimi/src/importer_api.rs b/packages/node-mimimi/src/importer_api.rs index e66a931f906..8c742a53c94 100644 --- a/packages/node-mimimi/src/importer_api.rs +++ b/packages/node-mimimi/src/importer_api.rs @@ -231,7 +231,6 @@ impl ImporterApi { match locked_local_state { Some(local_import_state) => { - let logged_in_sdk = ImporterApi::create_sdk(tuta_credentials).await?; let mut local_import_state = local_import_state.lock().await; local_import_state.import_progress_action = import_progress_action; @@ -240,6 +239,7 @@ impl ImporterApi { ImportProgressAction::Pause => { local_import_state.current_status = ImportStatus::Paused; + let logged_in_sdk = ImporterApi::create_sdk(tuta_credentials).await?; Importer::mark_remote_final_state(&logged_in_sdk, &local_import_state) .await?; @@ -249,6 +249,7 @@ impl ImporterApi { ImportProgressAction::Stop => { let previous_status = local_import_state.current_status; local_import_state.current_status = ImportStatus::Canceled; + let logged_in_sdk = ImporterApi::create_sdk(tuta_credentials).await?; Importer::mark_remote_final_state(&logged_in_sdk, &local_import_state) .await?; diff --git a/src/common/desktop/mailimport/DesktopMailImportFacade.ts b/src/common/desktop/mailimport/DesktopMailImportFacade.ts index 25c809df46f..8506a347087 100644 --- a/src/common/desktop/mailimport/DesktopMailImportFacade.ts +++ b/src/common/desktop/mailimport/DesktopMailImportFacade.ts @@ -64,7 +64,7 @@ export class DesktopMailImportFacade implements NativeMailImportFacade { } async setProgressAction(mailboxId: string, apiUrl: string, unencTutaCredentials: UnencryptedCredentials, progressAction: number) { - return ImporterApi.setProgressAction(mailboxId, this.createTutaCredentials(unencTutaCredentials, apiUrl), progressAction, this.configDirectory) + return await ImporterApi.setProgressAction(mailboxId, this.createTutaCredentials(unencTutaCredentials, apiUrl), progressAction, this.configDirectory) } async getResumeableImport(mailboxId: string): Promise { @@ -80,16 +80,7 @@ export class DesktopMailImportFacade implements NativeMailImportFacade { listId: listIdPart(importStateId), elementId: elementIdPart(importStateId), } - const tutaCredentials: TutaCredentials = { - accessToken: unencTutaCredentials?.accessToken, - isInternalCredential: unencTutaCredentials.credentialInfo.type === CredentialType.Internal, - encryptedPassphraseKey: unencTutaCredentials.encryptedPassphraseKey ? Array.from(unencTutaCredentials.encryptedPassphraseKey) : [], - login: unencTutaCredentials.credentialInfo.login, - userId: unencTutaCredentials.credentialInfo.userId, - apiUrl: apiUrl, - clientVersion: env.versionNumber, - } - + const tutaCredentials = this.createTutaCredentials(unencTutaCredentials, apiUrl) await ImporterApi.resumeFileImport(mailboxId, tutaCredentials, importMailStateId, this.configDirectory) } } From 67d6abf5b96d130d01d254e0af83521f6965bd88 Mon Sep 17 00:00:00 2001 From: jhm <17314077+jomapp@users.noreply.github.com> Date: Thu, 9 Jan 2025 15:40:28 +0100 Subject: [PATCH 2/5] fix import ui states --- packages/node-mimimi/src/importer.rs | 20 ++++- packages/node-mimimi/src/importer_api.rs | 49 +++++------ src/mail-app/mail/import/MailImporter.ts | 82 ++++++++++++------- .../settings/MailImportSettingsViewer.ts | 4 +- 4 files changed, 93 insertions(+), 62 deletions(-) diff --git a/packages/node-mimimi/src/importer.rs b/packages/node-mimimi/src/importer.rs index 614ff93bf7c..c930345b587 100644 --- a/packages/node-mimimi/src/importer.rs +++ b/packages/node-mimimi/src/importer.rs @@ -148,8 +148,7 @@ pub enum ImportParams { /// keep in sync with TutanotaConstants.ts #[cfg_attr(feature = "javascript", napi_derive::napi)] #[cfg_attr(not(feature = "javascript"), derive(Clone))] -#[derive(PartialEq, Default)] -#[cfg_attr(test, derive(Debug))] +#[derive(PartialEq, Default, Debug)] #[repr(u8)] pub enum ImportStatus { #[default] @@ -158,6 +157,7 @@ pub enum ImportStatus { Canceled = 2, Finished = 3, Error = 4, + ServiceUnavailable = 5, } /// A running import can be stopped or paused @@ -614,7 +614,8 @@ impl Importer { local_state.current_status == ImportStatus::Finished || local_state.current_status == ImportStatus::Canceled || local_state.current_status == ImportStatus::Paused, - "only cancel and finished should be final state" + "only cancel and finished should be final state {:?}", + local_state.current_status ); // we reached final state before making first call, was either empty mails or was cancelled before making first post call @@ -741,6 +742,19 @@ impl Importer { } } + if import_progress_action == ImportProgressAction::Pause { + self.update_state(|mut state| state.change_status(ImportStatus::Paused)) + .await; + } else if import_progress_action == ImportProgressAction::Stop { + self.update_state(|mut state| state.change_status(ImportStatus::Canceled)) + .await; + Self::delete_import_dir(&self.import_directory)?; + } + + let current_state = self.get_state(|state| state.clone()).await; + Importer::mark_remote_final_state(&self.essentials.logged_in_sdk, ¤t_state) + .await?; + Ok(()) } diff --git a/packages/node-mimimi/src/importer_api.rs b/packages/node-mimimi/src/importer_api.rs index 8c742a53c94..9101f4e1c9e 100644 --- a/packages/node-mimimi/src/importer_api.rs +++ b/packages/node-mimimi/src/importer_api.rs @@ -150,9 +150,17 @@ impl ImporterApi { Ok(_) => {}, Err(e) => { log::error!("Importer task failed: {:?}", e); - inner - .update_state(|mut state| state.change_status(ImportStatus::Error)) - .await; + if let ImportError::NoImportFeature = e { + inner + .update_state(|mut state| { + state.change_status(ImportStatus::ServiceUnavailable) + }) + .await; + } else { + inner + .update_state(|mut state| state.change_status(ImportStatus::Error)) + .await; + }; }, }; }); @@ -234,32 +242,15 @@ impl ImporterApi { let mut local_import_state = local_import_state.lock().await; local_import_state.import_progress_action = import_progress_action; - match import_progress_action { - ImportProgressAction::Continue => Ok(()), - - ImportProgressAction::Pause => { - local_import_state.current_status = ImportStatus::Paused; - let logged_in_sdk = ImporterApi::create_sdk(tuta_credentials).await?; - Importer::mark_remote_final_state(&logged_in_sdk, &local_import_state) - .await?; - - Ok(()) - }, - - ImportProgressAction::Stop => { - let previous_status = local_import_state.current_status; - local_import_state.current_status = ImportStatus::Canceled; - let logged_in_sdk = ImporterApi::create_sdk(tuta_credentials).await?; - Importer::mark_remote_final_state(&logged_in_sdk, &local_import_state) - .await?; - - if previous_status != ImportStatus::Running { - Importer::delete_import_dir(&import_directory_path)?; - } - - Ok(()) - }, - } + if local_import_state.current_status != ImportStatus::Running + && import_progress_action == ImportProgressAction::Stop + { + local_import_state.current_status = ImportStatus::Canceled; + Importer::delete_import_dir(&import_directory_path)?; + let logged_in_sdk = ImporterApi::create_sdk(tuta_credentials).await?; + Importer::mark_remote_final_state(&logged_in_sdk, &local_import_state).await?; + }; + Ok(()) }, None => { diff --git a/src/mail-app/mail/import/MailImporter.ts b/src/mail-app/mail/import/MailImporter.ts index 0ab74656699..3f0dccf193f 100644 --- a/src/mail-app/mail/import/MailImporter.ts +++ b/src/mail-app/mail/import/MailImporter.ts @@ -136,6 +136,8 @@ export class MailImporter { if (isEmpty(filePaths)) return if (!this.shouldShowStartButton()) throw new ProgrammingError("can't change state to starting") + this.resetStatus() + const apiUrl = getApiBaseUrl(this.domainConfigProvider.getCurrentDomainConfig()) const ownerGroup = assertNotNull(targetFolder._ownerGroup) const userId = this.loginController.getUserController().userId @@ -146,7 +148,14 @@ export class MailImporter { this.isLastRunFailed = false this.startProgressEstimation() m.redraw() - await importFacade.startFileImport((await this.getMailbox())._id, apiUrl, unencryptedCredentials, ownerGroup, targetFolder._id, filePaths) + + try { + await importFacade.startFileImport((await this.getMailbox())._id, apiUrl, unencryptedCredentials, ownerGroup, targetFolder._id, filePaths) + } catch (e) { + this.uiStatus = UiImportStatus.Error + console.log("could not start file import", e) + m.redraw() + } } async onPauseBtnClick() { @@ -154,16 +163,11 @@ export class MailImporter { throw new ProgrammingError("can't change state to pausing") } - this.stopProgressEstimation() this.uiStatus = UiImportStatus.Pausing + this.stopProgressEstimation() m.redraw() - const importFacade = assertNotNull(this.nativeMailImportFacade) - const apiUrl = getApiBaseUrl(this.domainConfigProvider.getCurrentDomainConfig()) - const userId = this.loginController.getUserController().userId - - const unencryptedCredentials = assertNotNull(await this.credentialsProvider?.getDecryptedCredentialsByUserId(userId)) - await importFacade.setProgressAction((await this.getMailbox())._id, apiUrl, unencryptedCredentials, ImportProgressAction.Pause) + await this.setProgressAction(ImportProgressAction.Pause) } async onResumeBtnClick() { @@ -181,27 +185,27 @@ export class MailImporter { const unencryptedCredentials = assertNotNull(await this.credentialsProvider?.getDecryptedCredentialsByUserId(userId)) const resumableStateId = assertNotNull(this.activeImport?.remoteStateId) - await importFacade.resumeFileImport((await this.getMailbox())._id, apiUrl, unencryptedCredentials, resumableStateId) + try { + await importFacade.resumeFileImport((await this.getMailbox())._id, apiUrl, unencryptedCredentials, resumableStateId) + } catch (e) { + this.uiStatus = UiImportStatus.Error + console.log("could not resume file import", e) + m.redraw() + } } async onCancelBtnClick() { if (!this.shouldShowCancelButton()) throw new ProgrammingError("can't change state to cancelling") - const importFacade = assertNotNull(this.nativeMailImportFacade) - - this.stopProgressEstimation() this.uiStatus = UiImportStatus.Cancelling + this.stopProgressEstimation() m.redraw() - const apiUrl = getApiBaseUrl(this.domainConfigProvider.getCurrentDomainConfig()) - const userId = this.loginController.getUserController().userId - - const unencryptedCredentials = assertNotNull(await this.credentialsProvider?.getDecryptedCredentialsByUserId(userId)) - await importFacade.setProgressAction((await this.getMailbox())._id, apiUrl, unencryptedCredentials, ImportProgressAction.Stop) + await this.setProgressAction(ImportProgressAction.Stop) } shouldShowStartButton() { - return this.wsConnectionOnline && this.uiStatus === UiImportStatus.Idle + return this.wsConnectionOnline && (this.uiStatus === UiImportStatus.Idle || this.uiStatus === UiImportStatus.Error) } shouldShowImportStatus(): boolean { @@ -215,11 +219,14 @@ export class MailImporter { } shouldShowPauseButton(): boolean { - return this.wsConnectionOnline && (this.uiStatus === UiImportStatus.Running || this.uiStatus === UiImportStatus.Pausing) + return ( + this.wsConnectionOnline && + (this.uiStatus === UiImportStatus.Running || this.uiStatus === UiImportStatus.Starting || this.uiStatus === UiImportStatus.Pausing) + ) } shouldDisablePauseButton(): boolean { - return this.wsConnectionOnline && this.uiStatus === UiImportStatus.Pausing + return (this.wsConnectionOnline && this.uiStatus === UiImportStatus.Pausing) || this.uiStatus === UiImportStatus.Starting } shouldShowResumeButton(): boolean { @@ -227,7 +234,7 @@ export class MailImporter { } shouldDisableResumeButton(): boolean { - return !this.wsConnectionOnline || this.uiStatus === UiImportStatus.Resuming + return !this.wsConnectionOnline || this.uiStatus === UiImportStatus.Resuming || this.uiStatus === UiImportStatus.Starting } shouldShowCancelButton(): boolean { @@ -241,7 +248,12 @@ export class MailImporter { } shouldDisableCancelButton(): boolean { - return !this.wsConnectionOnline || this.uiStatus === UiImportStatus.Cancelling || this.uiStatus === UiImportStatus.Pausing + return ( + !this.wsConnectionOnline || + this.uiStatus === UiImportStatus.Cancelling || + this.uiStatus === UiImportStatus.Pausing || + this.uiStatus === UiImportStatus.Starting + ) } shouldShowProcessedMails(): boolean { @@ -324,7 +336,7 @@ export class MailImporter { */ async onNewLocalImportMailState(localImportMailState: LocalImportMailState): Promise { const previousState = this.activeImport - if (localImportMailState.status == ImportStatus.Error) { + if (localImportMailState.status == ImportStatus.ServiceUnavailable) { this.resetStatus() if (!this.isLastRunFailed) { this.isLastRunFailed = true @@ -396,12 +408,7 @@ export class MailImporter { this.stopProgressEstimation() this.uiStatus = UiImportStatus.Paused m.redraw() - const importFacade = assertNotNull(this.nativeMailImportFacade) - const apiUrl = getApiBaseUrl(this.domainConfigProvider.getCurrentDomainConfig()) - const userId = this.loginController.getUserController().userId - - const unencryptedCredentials = assertNotNull(await this.credentialsProvider?.getDecryptedCredentialsByUserId(userId)) - await importFacade.setProgressAction((await this.getMailbox())._id, apiUrl, unencryptedCredentials, ImportProgressAction.Pause) + await this.setProgressAction(ImportProgressAction.Pause) } }) } @@ -418,6 +425,20 @@ export class MailImporter { } } + async setProgressAction(progressAction: ImportProgressAction): Promise { + const importFacade = assertNotNull(this.nativeMailImportFacade) + + const apiUrl = getApiBaseUrl(this.domainConfigProvider.getCurrentDomainConfig()) + const userId = this.loginController.getUserController().userId + const unencryptedCredentials = assertNotNull(await this.credentialsProvider?.getDecryptedCredentialsByUserId(userId)) + + try { + await importFacade.setProgressAction((await this.getMailbox())._id, apiUrl, unencryptedCredentials, progressAction) + } catch (e) { + console.log(`could execute progress action ${progressAction} for file import`, e) + } + } + async entityEventsReceived(updates: ReadonlyArray): Promise { for (const update of updates) { if (isUpdateForTypeRef(ImportMailStateTypeRef, update)) { @@ -463,6 +484,8 @@ function importStatusToUiImportStatus(importStatus: ImportStatus) { return UiImportStatus.Running case ImportStatus.Error: return UiImportStatus.Error + case ImportStatus.ServiceUnavailable: + return UiImportStatus.Error } } @@ -472,6 +495,7 @@ export const enum ImportStatus { Canceled = 2, Finished = 3, Error = 4, + ServiceUnavailable = 5, } export function isFinalisedImport(remoteImportStatus: ImportStatus): boolean { diff --git a/src/mail-app/settings/MailImportSettingsViewer.ts b/src/mail-app/settings/MailImportSettingsViewer.ts index e1179aaf21d..b6eee57c15d 100644 --- a/src/mail-app/settings/MailImportSettingsViewer.ts +++ b/src/mail-app/settings/MailImportSettingsViewer.ts @@ -29,7 +29,7 @@ import { formatDate } from "../../common/misc/Formatter.js" export class MailImportSettingsViewer implements UpdatableSettingsViewer { private foldersForMailbox: FolderSystem | undefined private selectedTargetFolder: MailFolder | null = null - private isImportHistoryExpanded: boolean = false + private isImportHistoryExpanded: boolean = true private mailImporter: MailImporter private fileApp: NativeFileApp | null @@ -353,5 +353,7 @@ export function getImportStatusTranslationKey(importStatus: ImportStatus): Trans return "mailImportStatusFinished_label" case ImportStatus.Error: return "mailImportStatusError_label" + case ImportStatus.ServiceUnavailable: + return "mailImportStatusError_label" } } From 305031303c048ad6d3a032012576b216c60fd9c5 Mon Sep 17 00:00:00 2001 From: Kinan <104761667+kibibytium@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:26:08 +0100 Subject: [PATCH 3/5] fix import ui when offline and recover import afterwards --- src/mail-app/mail/import/MailImporter.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mail-app/mail/import/MailImporter.ts b/src/mail-app/mail/import/MailImporter.ts index 3f0dccf193f..552819593e0 100644 --- a/src/mail-app/mail/import/MailImporter.ts +++ b/src/mail-app/mail/import/MailImporter.ts @@ -214,7 +214,8 @@ export class MailImporter { this.uiStatus === UiImportStatus.Running || this.uiStatus === UiImportStatus.Pausing || this.uiStatus === UiImportStatus.Paused || - this.uiStatus === UiImportStatus.Cancelling + this.uiStatus === UiImportStatus.Cancelling || + this.uiStatus === UiImportStatus.Error ) } @@ -359,7 +360,7 @@ export class MailImporter { this.uiStatus = importStatusToUiImportStatus(this.activeImport.status) this.updateProgressMonitorTotalWork(localImportMailState.totalMails) this.progressMonitor?.totalWorkDone(localImportMailState.successfulMails + localImportMailState.failedMails) - if (localImportMailState.status == ImportStatus.Finished) this.stopProgressEstimation() + if (localImportMailState.status == ImportStatus.Finished || localImportMailState.status === ImportStatus.Error) this.stopProgressEstimation() } } m.redraw() @@ -406,9 +407,10 @@ export class MailImporter { this.wsConnectionOnline = wsConnection === WsConnectionState.connected if (haveImportOngoing && !this.wsConnectionOnline) { this.stopProgressEstimation() - this.uiStatus = UiImportStatus.Paused m.redraw() - await this.setProgressAction(ImportProgressAction.Pause) + } else if (haveImportOngoing && this.wsConnectionOnline) { + await this.setProgressAction(ImportProgressAction.Continue) + this.uiStatus = UiImportStatus.Paused } }) } From 7dad473f2a813b62ad2a262c87e36139fb016284 Mon Sep 17 00:00:00 2001 From: jhm <17314077+jomapp@users.noreply.github.com> Date: Thu, 9 Jan 2025 19:06:44 +0100 Subject: [PATCH 4/5] allow starting new import in case of import error --- src/mail-app/mail/import/MailImporter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mail-app/mail/import/MailImporter.ts b/src/mail-app/mail/import/MailImporter.ts index 552819593e0..8d41dbcce83 100644 --- a/src/mail-app/mail/import/MailImporter.ts +++ b/src/mail-app/mail/import/MailImporter.ts @@ -215,7 +215,7 @@ export class MailImporter { this.uiStatus === UiImportStatus.Pausing || this.uiStatus === UiImportStatus.Paused || this.uiStatus === UiImportStatus.Cancelling || - this.uiStatus === UiImportStatus.Error + this.uiStatus === UiImportStatus.Resuming ) } From decb78d39e8f51090b2d34d80bf2e513e9cf2e75 Mon Sep 17 00:00:00 2001 From: nig Date: Thu, 9 Jan 2025 14:56:30 +0100 Subject: [PATCH 5/5] split up swift-test.yml to run calendar and mail test in parallel --- .github/shared/swift-common/action.yml | 39 +++++++++++++ .github/workflows/swift-calendar-test.yml | 57 +++++++++++++++++++ .../{swift-test.yml => swift-mail-test.yml} | 38 +------------ 3 files changed, 99 insertions(+), 35 deletions(-) create mode 100644 .github/shared/swift-common/action.yml create mode 100644 .github/workflows/swift-calendar-test.yml rename .github/workflows/{swift-test.yml => swift-mail-test.yml} (51%) diff --git a/.github/shared/swift-common/action.yml b/.github/shared/swift-common/action.yml new file mode 100644 index 00000000000..143b4d4315d --- /dev/null +++ b/.github/shared/swift-common/action.yml @@ -0,0 +1,39 @@ +name: "Swift Common" +description: "Common Swift Checks" + +runs: + using: "composite" + + steps: + - name: Setup Swift + uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4 # v1.26.2 + with: + swift-version: ${{ env.swift-version }} + - name: Install Homebrew + uses: Homebrew/actions/setup-homebrew@d54a6744d5fcdff54b45a9659f3e17f769389952 + - name: Install Homebrew dependencies + shell: bash + run: | + brew install swiftlint swift-format xcodegen + brew upgrade rustup + - name: Versions + shell: bash + run: | + rustup --version + cargo --version + rustc --version + - name: Add rust target + shell: bash + run: rustup target add aarch64-apple-ios-sim + - name: Lint + working-directory: ./app-ios + shell: bash + run: ./lint.sh lint:check + - name: Format + working-directory: ./app-ios + shell: bash + run: ./lint.sh style:check + - name: Xcodegen sdk + working-directory: tuta-sdk/ios + shell: bash + run: xcodegen \ No newline at end of file diff --git a/.github/workflows/swift-calendar-test.yml b/.github/workflows/swift-calendar-test.yml new file mode 100644 index 00000000000..f01586f81a9 --- /dev/null +++ b/.github/workflows/swift-calendar-test.yml @@ -0,0 +1,57 @@ +name: Swift CI - Calendar + +on: + pull_request: + types: [ opened, synchronize, edited ] + paths: + - 'app-ios/**' + - '.github/workflows/swift-calendar-test.yml' + push: + branches: + - dev-* + - '*/dev' + paths: + - 'app-ios/**' + +env: + swift-version: "5.9.2" + swift-format-version: "509.0.0" + +jobs: + test-swift: + runs-on: macos-14 + + permissions: + actions: none + checks: none + contents: read + deployments: none + id-token: none + issues: none + discussions: none + packages: none + pages: none + pull-requests: none + repository-projects: none + security-events: none + statuses: none + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 + with: + submodules: 'true' + - uses: ./.github/shared/swift-common + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 #3.0.2 + id: filter + with: + filters: | + calendar: + - 'app-ios/calendar/**' + - name: Test Calendar + working-directory: app-ios + if: ${{ steps.filter.outputs.calendar == 'true' }} + run: | + mkdir -p ../build-calendar-app + xcodegen --spec calendar-project.yml + fastlane test_calendar_github + diff --git a/.github/workflows/swift-test.yml b/.github/workflows/swift-mail-test.yml similarity index 51% rename from .github/workflows/swift-test.yml rename to .github/workflows/swift-mail-test.yml index a292b634312..54afb06f5db 100644 --- a/.github/workflows/swift-test.yml +++ b/.github/workflows/swift-mail-test.yml @@ -1,11 +1,11 @@ -name: Swift CI +name: Swift CI - Mail on: pull_request: types: [ opened, synchronize, edited ] paths: - 'app-ios/**' - - '.github/workflows/swift-test.yml' + - '.github/workflows/swift-mail-test.yml' push: branches: - dev-* @@ -40,16 +40,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 with: submodules: 'true' - - name: Setup Swift - uses: swift-actions/setup-swift@cdbe0f7f4c77929b6580e71983e8606e55ffe7e4 # v1.26.2 - with: - swift-version: ${{ env.swift-version }} - - name: Install Homebrew - uses: Homebrew/actions/setup-homebrew@d54a6744d5fcdff54b45a9659f3e17f769389952 - - name: Install Homebrew dependencies - run: | - brew install swiftlint swift-format xcodegen - brew upgrade rustup + - uses: ./.github/shared/swift-common - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 #3.0.2 id: filter with: @@ -58,29 +49,6 @@ jobs: - 'app-ios/tutanota/**' calendar: - 'app-ios/calendar/**' - - name: Versions - run: | - rustup --version - cargo --version - rustc --version - - name: Add rust target - run: rustup target add aarch64-apple-ios-sim - - name: Lint - working-directory: ./app-ios - run: ./lint.sh lint:check - - name: Format - working-directory: ./app-ios - run: ./lint.sh style:check - - name: Xcodegen sdk - working-directory: tuta-sdk/ios - run: xcodegen - - name: Test Calendar - working-directory: app-ios - if: ${{ steps.filter.outputs.calendar == 'true' }} - run: | - mkdir -p ../build-calendar-app - xcodegen --spec calendar-project.yml - fastlane test_calendar_github - name: Test Mail working-directory: app-ios if: ${{ steps.filter.outputs.calendar == 'false' || steps.filter.outputs.mail == 'true' }} # Runs mail test also as fallback test