mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Project file removal (#569)
* Deleted project file * Add back SPM Package.resolved + .gitignore * Generate project file on release builds * Converge on single CI setup scripts within `ci_scripts/ci_common.sh` * Fix unit tests * Use new `ci_common/setup_github_actions_environment` setup script on all workflows * Move lfs validation check to the pre-commit hooks. Remove validate-lfs github actions workflow * Fix integration tests workflow * Tweaks following code review
This commit is contained in:
parent
ee4e4a212b
commit
7ab64d4cb4
@ -7,4 +7,6 @@ then
|
||||
echo "pre-commit: Commit aborted due to SwiftFormat warnings. Please check the automatically generated fixes and try again"
|
||||
swiftformat . > /dev/null 2>&1
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
./Tools/Scripts/validate_lfs.sh
|
11
.github/workflows/integration-tests.yml
vendored
11
.github/workflows/integration-tests.yml
vendored
@ -19,10 +19,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Brew bundle
|
||||
run:
|
||||
brew update && brew bundle && brew upgrade swiftformat
|
||||
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/bundle
|
||||
@ -30,10 +26,9 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
|
||||
- name: Bundle install
|
||||
run: |
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
- name: Setup environment
|
||||
run:
|
||||
source ci_scripts/ci_common.sh && setup_github_actions_environment
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec fastlane integration_tests
|
||||
|
16
.github/workflows/pr-build.yml
vendored
16
.github/workflows/pr-build.yml
vendored
@ -21,27 +21,17 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache Ruby gems
|
||||
uses: actions/cache@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
|
||||
- name: Brew bundle
|
||||
- name: Setup environment
|
||||
run:
|
||||
brew bundle
|
||||
source ci_scripts/ci_common.sh && setup_github_actions_environment
|
||||
|
||||
- name: SwiftFormat
|
||||
run:
|
||||
swiftformat --lint .
|
||||
|
||||
- name: Bundle install
|
||||
run: |
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
|
||||
- name: Import signing certificate
|
||||
uses: apple-actions/import-codesign-certs@v1
|
||||
with:
|
||||
|
11
.github/workflows/ui_tests.yml
vendored
11
.github/workflows/ui_tests.yml
vendored
@ -22,10 +22,6 @@ jobs:
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
- name: Brew bundle
|
||||
run:
|
||||
brew update && brew bundle && brew upgrade swiftformat
|
||||
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/bundle
|
||||
@ -33,10 +29,9 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
|
||||
- name: Bundle install
|
||||
run: |
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
- name: Setup environment
|
||||
run:
|
||||
source ci_scripts/ci_common.sh && setup_github_actions_environment
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec fastlane ui_tests
|
||||
|
19
.github/workflows/unit_tests.yml
vendored
19
.github/workflows/unit_tests.yml
vendored
@ -24,14 +24,6 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Brew bundle
|
||||
run:
|
||||
brew update && brew bundle && brew upgrade swiftformat
|
||||
|
||||
- name: SwiftFormat
|
||||
run:
|
||||
swiftformat --lint .
|
||||
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: vendor/bundle
|
||||
@ -39,11 +31,14 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
|
||||
- name: Bundle install
|
||||
run: |
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
- name: Setup environment
|
||||
run:
|
||||
source ci_scripts/ci_common.sh && setup_github_actions_environment
|
||||
|
||||
- name: SwiftFormat
|
||||
run:
|
||||
swiftformat --lint .
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec fastlane unit_tests
|
||||
|
||||
|
19
.github/workflows/validate-lfs.yml
vendored
19
.github/workflows/validate-lfs.yml
vendored
@ -1,19 +0,0 @@
|
||||
name: Validate Git LFS
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
schedule:
|
||||
- cron: '0 0 * * 1-5'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Validate
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
- run: |
|
||||
./Tools/Scripts/validate_lfs.sh
|
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,3 +1,16 @@
|
||||
## Ignore project files as we generate them with xcodegen (https://github.com/yonaskolb/XcodeGen)
|
||||
|
||||
# Plus ridiculous workaround to unignore the Package.resolved file for SwiftPM.
|
||||
# https://stackoverflow.com/a/16318111/730924
|
||||
ElementX.xcodeproj/*
|
||||
!ElementX.xcodeproj/project.xcworkspace
|
||||
ElementX.xcodeproj/project.xcworkspace/*
|
||||
!ElementX.xcodeproj/project.xcworkspace/xcshareddata
|
||||
ElementX.xcodeproj/project.xcworkspace/xcshareddata/*
|
||||
!ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm
|
||||
ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/*
|
||||
!ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
|
||||
|
||||
## User settings
|
||||
xcuserdata/
|
||||
|
||||
@ -35,9 +48,6 @@ build
|
||||
Tools/Scripts/element-android
|
||||
/vendor/
|
||||
|
||||
## brew
|
||||
Brewfile.lock.json
|
||||
|
||||
## macOS Files
|
||||
.DS_Store
|
||||
._*
|
||||
|
7
Brewfile
7
Brewfile
@ -1,7 +0,0 @@
|
||||
brew "xcodegen"
|
||||
brew "swiftgen"
|
||||
brew "swiftformat"
|
||||
brew "git-lfs"
|
||||
|
||||
#brew "swiftlint" # Fails on the CI: `Target /usr/local/bin/swiftlint Target /usr/local/bin/swiftlint already exists`. Installed through https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#linters
|
||||
#brew "imagemagick" # Upgrading imagemagick has failed!
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>FILEHEADER</key>
|
||||
<string>
|
||||
// Copyright ___YEAR___ New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C0FAEB81CFD9776CD78CE489"
|
||||
BuildableName = "ElementX.app"
|
||||
BlueprintName = "ElementX"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "NO"
|
||||
codeCoverageEnabled = "YES"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C0FAEB81CFD9776CD78CE489"
|
||||
BuildableName = "ElementX.app"
|
||||
BlueprintName = "ElementX"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32C23C8D224D46EFE62AFAD0"
|
||||
BuildableName = "UnitTests.xctest"
|
||||
BlueprintName = "UnitTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "IS_RUNNING_UNIT_TESTS"
|
||||
value = "1"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<CodeCoverageTargets>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C0FAEB81CFD9776CD78CE489"
|
||||
BuildableName = "ElementX.app"
|
||||
BlueprintName = "ElementX"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C0FAEB81CFD9776CD78CE489"
|
||||
BuildableName = "ElementX.app"
|
||||
BlueprintName = "ElementX"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "RUST_BACKTRACE"
|
||||
value = "full"
|
||||
isEnabled = "NO">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "HTTPS_PROXY"
|
||||
value = "192.168.0.111:9090"
|
||||
isEnabled = "NO">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C0FAEB81CFD9776CD78CE489"
|
||||
BuildableName = "ElementX.app"
|
||||
BlueprintName = "ElementX"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,130 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D3DB351B7FBE0F49649171FC"
|
||||
BuildableName = "IntegrationTests.xctest"
|
||||
BlueprintName = "IntegrationTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D3DB351B7FBE0F49649171FC"
|
||||
BuildableName = "IntegrationTests.xctest"
|
||||
BlueprintName = "IntegrationTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D3DB351B7FBE0F49649171FC"
|
||||
BuildableName = "IntegrationTests.xctest"
|
||||
BlueprintName = "IntegrationTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<CodeCoverageTargets>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C0FAEB81CFD9776CD78CE489"
|
||||
BuildableName = "ElementX.app"
|
||||
BlueprintName = "ElementX"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D3DB351B7FBE0F49649171FC"
|
||||
BuildableName = "IntegrationTests.xctest"
|
||||
BlueprintName = "IntegrationTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "INTEGRATION_TESTS_HOST"
|
||||
value = "${INTEGRATION_TESTS_HOST}"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "INTEGRATION_TESTS_PASSWORD"
|
||||
value = "${INTEGRATION_TESTS_PASSWORD}"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
<EnvironmentVariable
|
||||
key = "INTEGRATION_TESTS_USERNAME"
|
||||
value = "${INTEGRATION_TESTS_USERNAME}"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "D3DB351B7FBE0F49649171FC"
|
||||
BuildableName = "IntegrationTests.xctest"
|
||||
BlueprintName = "IntegrationTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
wasCreatedForAppExtension = "YES"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FEB53A5BC378C913769656D8"
|
||||
BuildableName = "NSE.appex"
|
||||
BlueprintName = "NSE"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "NO">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FEB53A5BC378C913769656D8"
|
||||
BuildableName = "NSE.appex"
|
||||
BlueprintName = "NSE"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = ""
|
||||
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||
launchStyle = "0"
|
||||
askForAppToLaunch = "YES"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES"
|
||||
launchAutomaticallySubstyle = "2">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FEB53A5BC378C913769656D8"
|
||||
BuildableName = "NSE.appex"
|
||||
BlueprintName = "NSE"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "FEB53A5BC378C913769656D8"
|
||||
BuildableName = "NSE.appex"
|
||||
BlueprintName = "NSE"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0E28CD62691FDBC63147D5E3"
|
||||
BuildableName = "UITests.xctest"
|
||||
BlueprintName = "UITests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "NO">
|
||||
<TestPlans>
|
||||
<TestPlanReference
|
||||
default = "YES"
|
||||
reference = "container:UITests/SupportingFiles/UITests.xctestplan">
|
||||
</TestPlanReference>
|
||||
</TestPlans>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0E28CD62691FDBC63147D5E3"
|
||||
BuildableName = "UITests.xctest"
|
||||
BlueprintName = "UITests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0E28CD62691FDBC63147D5E3"
|
||||
BuildableName = "UITests.xctest"
|
||||
BlueprintName = "UITests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "0E28CD62691FDBC63147D5E3"
|
||||
BuildableName = "UITests.xctest"
|
||||
BlueprintName = "UITests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1200"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32C23C8D224D46EFE62AFAD0"
|
||||
BuildableName = "UnitTests.xctest"
|
||||
BlueprintName = "UnitTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32C23C8D224D46EFE62AFAD0"
|
||||
BuildableName = "UnitTests.xctest"
|
||||
BlueprintName = "UnitTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32C23C8D224D46EFE62AFAD0"
|
||||
BuildableName = "UnitTests.xctest"
|
||||
BlueprintName = "UnitTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<CodeCoverageTargets>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "C0FAEB81CFD9776CD78CE489"
|
||||
BuildableName = "ElementX.app"
|
||||
BlueprintName = "ElementX"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</CodeCoverageTargets>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32C23C8D224D46EFE62AFAD0"
|
||||
BuildableName = "UnitTests.xctest"
|
||||
BlueprintName = "UnitTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "IS_RUNNING_UNIT_TESTS"
|
||||
value = "1"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<CommandLineArguments>
|
||||
</CommandLineArguments>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32C23C8D224D46EFE62AFAD0"
|
||||
BuildableName = "UnitTests.xctest"
|
||||
BlueprintName = "UnitTests"
|
||||
ReferencedContainer = "container:ElementX.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -33,7 +33,7 @@ extension Date {
|
||||
return formatted(.dateTime.weekday(.wide))
|
||||
} else if let oneYearAgo = calendar.date(byAdding: .year, value: -1, to: .now),
|
||||
oneYearAgo <= self {
|
||||
// The day and month if it was in the last 6 days.
|
||||
// The day and month if it was in the past year
|
||||
return formatted(.dateTime.day().month())
|
||||
} else {
|
||||
// The day, month and year if it is any older.
|
||||
|
@ -15,7 +15,7 @@ struct SetupProject: ParsableCommand {
|
||||
}
|
||||
|
||||
func brewBundleInstall() throws {
|
||||
try Utilities.zsh("brew bundle install")
|
||||
try Utilities.zsh("brew install xcodegen swiftgen swiftlint swiftformat git-lfs")
|
||||
}
|
||||
|
||||
func xcodegen() throws {
|
||||
|
@ -24,20 +24,20 @@ class DateTests: XCTestCase {
|
||||
let startOfYesterday = Calendar.current.startOfDay(for: Calendar.current.date(byAdding: .day, value: -1, to: .now)!)
|
||||
|
||||
func testMinimalDateFormatting() {
|
||||
let today = calendar.date(byAdding: DateComponents(hour: 9, minute: 30), to: startOfToday)
|
||||
XCTAssertEqual(today?.formattedMinimal(), "9:30 AM")
|
||||
let today = calendar.date(byAdding: DateComponents(hour: 9, minute: 30), to: startOfToday)!
|
||||
XCTAssertEqual(today.formattedMinimal(), today.formatted(date: .omitted, time: .shortened))
|
||||
|
||||
let yesterday = calendar.date(byAdding: .hour, value: 1, to: startOfYesterday)
|
||||
XCTAssertEqual(yesterday?.formattedMinimal(), "Yesterday")
|
||||
let yesterday = calendar.date(byAdding: .hour, value: 1, to: startOfYesterday)!
|
||||
XCTAssertEqual(yesterday.formattedMinimal(), yesterday.formatted(Date.RelativeFormatStyle(presentation: .named, capitalizationContext: .beginningOfSentence)))
|
||||
|
||||
let saturday = calendar.nextWeekend(startingAfter: startOfToday, direction: .backward)?.start
|
||||
XCTAssertEqual(saturday?.formattedMinimal(), "Saturday")
|
||||
let threeDaysAgo = calendar.date(byAdding: .day, value: -3, to: startOfToday)!
|
||||
XCTAssertEqual(threeDaysAgo.formattedMinimal(), threeDaysAgo.formatted(.dateTime.weekday(.wide)))
|
||||
|
||||
// This test will fail during the first 6 days of the year.
|
||||
let newYearsDay = calendar.date(from: DateComponents(year: calendar.component(.year, from: startOfToday), month: 1, day: 1))!
|
||||
XCTAssertEqual(newYearsDay.formattedMinimal(), "Jan 1")
|
||||
let sometimeThisYear = calendar.date(byAdding: .month, value: -10, to: startOfToday)!
|
||||
XCTAssertEqual(sometimeThisYear.formattedMinimal(), sometimeThisYear.formatted(.dateTime.day().month()))
|
||||
|
||||
let theMillennium = calendar.date(from: DateComponents(year: 2000, month: 1, day: 1))!
|
||||
XCTAssertEqual(theMillennium.formattedMinimal(), "Jan 1, 2000")
|
||||
XCTAssertEqual(theMillennium.formattedMinimal(), theMillennium.formatted(.dateTime.year().day().month()))
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
setup_environment () {
|
||||
setup_xcode_cloud_environment () {
|
||||
# Return on failures
|
||||
# Fail when expanding unset variables
|
||||
# Trace each command before executing it
|
||||
@ -21,7 +21,7 @@ setup_environment () {
|
||||
export PATH="/Users/local/Library/Python/3.9/bin:$PATH"
|
||||
|
||||
# Things don't work well on the default ruby version
|
||||
brew install "ruby@2.7"
|
||||
brew install ruby@2.7
|
||||
|
||||
gem install bundler
|
||||
|
||||
@ -29,11 +29,22 @@ setup_environment () {
|
||||
bundle install --jobs 4 --retry 3
|
||||
}
|
||||
|
||||
install_brew_dependencies () {
|
||||
brew install "xcodegen"
|
||||
brew install "imagemagick"
|
||||
install_xcode_cloud_brew_dependencies () {
|
||||
brew install xcodegen imagemagick
|
||||
}
|
||||
|
||||
install_python_dependencies () {
|
||||
pip3 install -r requirements.txt # Install towncrier for generating changelogs
|
||||
install_xcode_cloud_python_dependencies () {
|
||||
pip3 install towncrier # Install towncrier for generating changelogs
|
||||
}
|
||||
|
||||
setup_github_actions_environment() {
|
||||
brew install xcodegen swiftformat git-lfs
|
||||
|
||||
# brew "swiftlint" # Fails on the CI: `Target /usr/local/bin/swiftlint Target /usr/local/bin/swiftlint already exists`. Installed through https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#linters
|
||||
# brew "imagemagick" # Upgrading imagemagick has failed!
|
||||
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
|
||||
xcodegen
|
||||
}
|
@ -2,10 +2,12 @@
|
||||
|
||||
source ci_common.sh
|
||||
|
||||
setup_xcode_cloud_environment
|
||||
|
||||
install_xcode_cloud_brew_dependencies
|
||||
|
||||
if [ "$CI_WORKFLOW" = "Nightly" ]; then
|
||||
setup_environment
|
||||
|
||||
install_brew_dependencies
|
||||
|
||||
bundle exec fastlane config_nightly
|
||||
else
|
||||
xcodegen
|
||||
fi
|
@ -2,10 +2,10 @@
|
||||
|
||||
source ci_common.sh
|
||||
|
||||
setup_environment
|
||||
setup_xcode_cloud_environment
|
||||
|
||||
if [ "$CI_WORKFLOW" = "Release" ]; then
|
||||
install_python_dependencies
|
||||
install_xcode_cloud_python_dependencies
|
||||
|
||||
bundle exec fastlane release_to_github
|
||||
bundle exec fastlane prepare_next_release
|
||||
|
@ -1,3 +0,0 @@
|
||||
###### Requirements without Version Specifiers ######
|
||||
|
||||
towncrier
|
Loading…
x
Reference in New Issue
Block a user