Skip to content

Commit fed3b00

Browse files
committed
Merging dev into master
2 parents b9edc7b + a5f82d7 commit fed3b00

180 files changed

Lines changed: 14200 additions & 1866 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ ignore:
8080
- "shared"
8181
- "native"
8282
- "libs/**/*Test*/*"
83+
- "**/TestSetupUtils*"
8384

8485
flag_management:
8586
default_rules: # the rules that will be followed for any flag added, generally
@@ -110,4 +111,4 @@ component_management:
110111
- "libs/SmartStore/SmartStore/"
111112
- component_id: MobileSync
112113
paths:
113-
- "libs/MobileSync/MobileSync/"
114+
- "libs/MobileSync/MobileSync/"

.github/DangerFiles/TestOrchestrator.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010
SCHEMES = ['SalesforceSDKCommon', 'SalesforceAnalytics', 'SalesforceSDKCore', 'SmartStore', 'MobileSync']
1111

1212
modifed_libs = Set[]
13+
1314
for file in (git.modified_files + git.added_files);
1415
scheme = file.split("libs/").last.split("/").first
15-
if SCHEMES.include?(scheme)
16+
if SCHEMES.include?(scheme)
1617
modifed_libs.add(scheme)
1718
end
1819
end
1920

21+
# Matrix must have at least one value; run SalesforceSDKCore when no libs are modified
22+
modifed_libs.add(SCHEMES[2]) if modifed_libs.empty?
23+
2024
# Set Github Job output so we know which tests to run
2125
json_libs = modifed_libs.map { |l| "'#{l}'"}.join(", ")
2226
`echo "libs=[#{json_libs}]" >> $GITHUB_OUTPUT`

.github/workflows/nightly.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
xcode: ^16
2121
- ios: ^17
2222
xcode: ^16
23-
uses: ./.github/workflows/reusable-workflow.yaml
23+
uses: ./.github/workflows/reusable-test-workflow.yaml
2424
with:
2525
lib: ${{ matrix.lib }}
2626
ios: ${{ matrix.ios }}
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
app: [RestAPIExplorer, MobileSyncExplorer]
34+
app: [RestAPIExplorer, MobileSyncExplorer, AuthFlowTester]
3535
ios: [^26, ^18, ^17]
3636
include:
3737
- ios: ^26
@@ -40,10 +40,9 @@ jobs:
4040
xcode: ^16
4141
- ios: ^17
4242
xcode: ^16
43-
uses: ./.github/workflows/reusable-workflow.yaml
43+
uses: ./.github/workflows/reusable-build-workflow.yaml
4444
with:
45-
lib: ${{ matrix.app }}
45+
app: ${{ matrix.app }}
4646
ios: ${{ matrix.ios }}
4747
xcode: ${{ matrix.xcode }}
48-
build_only: true
49-
secrets: inherit
48+
secrets: inherit

.github/workflows/pr.yaml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
static-analysis:
9-
runs-on: macos-26
9+
runs-on: macos-latest
1010
env:
1111
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/DangerFiles/Gemfile
1212
steps:
@@ -55,7 +55,7 @@ jobs:
5555
run: bundle exec danger --dangerfile=.github/DangerFiles/StaticAnalysis.rb --danger_id=StaticAnalysis
5656

5757
test-orchestrator:
58-
runs-on: macos-26
58+
runs-on: macos-latest
5959
env:
6060
BUNDLE_GEMFILE: ${{ github.workspace }}/.github/DangerFiles/Gemfile
6161
outputs:
@@ -108,7 +108,7 @@ jobs:
108108
xcode: ^26
109109
- ios: ^18
110110
xcode: ^16
111-
uses: ./.github/workflows/reusable-workflow.yaml
111+
uses: ./.github/workflows/reusable-test-workflow.yaml
112112
with:
113113
lib: ${{ matrix.lib }}
114114
ios: ${{ matrix.ios }}
@@ -117,21 +117,42 @@ jobs:
117117
secrets: inherit
118118

119119
native-samples-pr:
120+
needs: [test-orchestrator]
120121
strategy:
121122
fail-fast: false
122123
matrix:
123-
app: [RestAPIExplorer, MobileSyncExplorer]
124+
app: [RestAPIExplorer, MobileSyncExplorer, AuthFlowTester]
124125
ios: [^26, ^18]
125126
include:
126127
- ios: ^26
127128
xcode: ^26
128129
- ios: ^18
129-
xcode: ^16
130-
uses: ./.github/workflows/reusable-workflow.yaml
130+
xcode: ^16
131+
uses: ./.github/workflows/reusable-build-workflow.yaml
131132
with:
132-
lib: ${{ matrix.app }}
133+
app: ${{ matrix.app }}
133134
ios: ${{ matrix.ios }}
134135
xcode: ${{ matrix.xcode }}
135136
is_pr: true
136-
build_only: true
137+
secrets: inherit
138+
139+
ui-tests-pr:
140+
needs: [test-orchestrator]
141+
strategy:
142+
fail-fast: false
143+
matrix:
144+
ios: [^26, ^18]
145+
include:
146+
- ios: ^26
147+
xcode: ^26
148+
- ios: ^18
149+
xcode: ^16
150+
uses: ./.github/workflows/reusable-ui-test-workflow.yaml
151+
with:
152+
is_pr: true
153+
ios: ${{ matrix.ios }}
154+
xcode: ${{ matrix.xcode }}
155+
pr_test: "AuthFlowTesterUITests/LegacyLoginTests/testCAOpaque_DefaultScopes_WebServerFlow"
156+
short_timeout: "2"
157+
long_timeout: "7"
137158
secrets: inherit
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
app:
5+
required: true
6+
type: string
7+
ios:
8+
default: "^18"
9+
required: false
10+
type: string
11+
xcode:
12+
default: "^16"
13+
required: false
14+
type: string
15+
macos:
16+
default: macos-latest
17+
required: false
18+
type: string
19+
is_pr:
20+
type: boolean
21+
default: false
22+
23+
jobs:
24+
build-sample-app:
25+
runs-on: ${{ inputs.macos }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
if: ${{ inputs.is_pr }}
29+
with:
30+
ref: ${{ github.event.pull_request.head.sha }}
31+
- uses: actions/checkout@v4
32+
if: ${{ !inputs.is_pr }}
33+
with:
34+
ref: ${{ github.head_ref }}
35+
- name: Install Dependencies
36+
run: ./install.sh
37+
- name: Install iOS 17 runtime if needed
38+
if: ${{ inputs.ios == '^17' }}
39+
run: xcodes runtimes install "iOS 17.5"
40+
- uses: mxcl/xcodebuild@v3
41+
with:
42+
xcode: ${{ inputs.xcode }}
43+
platform: iOS
44+
platform-version: ${{ inputs.ios }}
45+
workspace: SalesforceMobileSDK.xcworkspace
46+
scheme: ${{ inputs.app }}
47+
action: 'build'
48+
verbosity: xcbeautify

.github/workflows/reusable-workflow.yaml renamed to .github/workflows/reusable-test-workflow.yaml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ on:
1313
required: false
1414
type: string
1515
macos:
16-
default: macos-26
16+
default: macos-latest
1717
required: false
1818
type: string
1919
is_pr:
2020
type: boolean
2121
default: false
22-
build_only:
23-
type: boolean
24-
default: false
2522

2623
jobs:
2724
test-ios:
@@ -32,7 +29,7 @@ jobs:
3229
with:
3330
ref: ${{ github.event.pull_request.head.sha }}
3431
- uses: actions/checkout@v4
35-
if: ${{ ! inputs.is_pr }}
32+
if: ${{ !inputs.is_pr }}
3633
with:
3734
ref: ${{ github.head_ref }}
3835
- name: Install Dependencies
@@ -45,27 +42,42 @@ jobs:
4542
if: ${{ inputs.ios == '^17' }}
4643
run: xcodes runtimes install "iOS 17.5"
4744
- uses: mxcl/xcodebuild@v3
45+
id: xcodebuild
4846
with:
4947
xcode: ${{ inputs.xcode }}
5048
platform: iOS
5149
platform-version: ${{ inputs.ios }}
5250
workspace: SalesforceMobileSDK.xcworkspace
5351
scheme: ${{ inputs.lib }}
54-
action: ${{ inputs.build_only && 'build' || 'test' }}
55-
code-coverage: ${{ ! inputs.build_only }}
52+
code-coverage: true
5653
verbosity: xcbeautify
57-
- uses: slidoapp/xcresulttool@v3.1.0
54+
- name: Parse test results
55+
if: success() || failure()
56+
run: |
57+
brew install xcresultparser
58+
xcresultparser -o junit test.xcresult > test-results-${{ inputs.lib }}-ios${{ inputs.ios }}.xml
59+
- name: Test Report
60+
uses: mikepenz/action-junit-report@v5
61+
if: success() || failure()
5862
with:
59-
path: test.xcresult
60-
title: "${{ inputs.lib }} iOS ${{ inputs.ios }}"
61-
show-code-coverage: false
62-
upload-bundles: false
63-
show-passed-tests: false
64-
# xcresulttool currently fails for iOS 26
65-
if: ${{ ! inputs.build_only && (success() || failure()) && inputs.ios != '^26' }}
63+
check_name: ${{ inputs.lib }} iOS ${{ inputs.ios }} Test Results
64+
job_name: ${{ inputs.lib }} iOS ${{ inputs.ios }} Test Results
65+
require_tests: true
66+
include_empty_in_summary: false
67+
simplified_summary: true
68+
detailed_summary: true
69+
comment: true
70+
job_summary: ${{ steps.xcodebuild.outcome == 'failure' }}
71+
report_paths: 'test-results-${{ inputs.lib }}-ios${{ inputs.ios }}.xml'
6672
- uses: codecov/codecov-action@v4
73+
if: success() || failure()
6774
with:
6875
flags: ${{ inputs.lib }}
6976
env:
7077
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
71-
if: ${{ ! inputs.build_only && (success() || failure()) }}
78+
- name: Upload test results artifact
79+
if: success() || failure()
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: test-results-${{ inputs.lib }}-ios${{ inputs.ios }}
83+
path: test-results-${{ inputs.lib }}-ios${{ inputs.ios }}.xml

0 commit comments

Comments
 (0)