Skip to content

Commit 5025d2e

Browse files
ci: Remove caching for UI tests (#2210)
The UI tests were using caches that stopped the UI tests from recompiling when there were changes in the library code. Instead, we need to recompile the test sample apps with their UI tests when there are changes in the library code to be able to catch bugs. This is fixed now by removing the cache.
1 parent 9fc2dd0 commit 5025d2e

File tree

4 files changed

+15
-44
lines changed

4 files changed

+15
-44
lines changed

.github/workflows/benchmarking.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,7 @@ jobs:
3030
- name: Install SentryCli
3131
run: brew install getsentry/tools/sentry-cli
3232
- run: git apply ./scripts/set-device-tests-environment.patch
33-
- name: Cache iOS-Swift App and dSYM build products
34-
id: ios-swift-cache
35-
uses: actions/cache@v3
36-
with:
37-
path: |
38-
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
39-
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
40-
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}
41-
- name: Cache iOS-Swift UI Test Runner App build product
42-
id: ios-swift-benchmark-runner-cache
43-
uses: actions/cache@v3
44-
with:
45-
path: |
46-
DerivedData/Build/Products/Debug-iphoneos/PerformanceBenchmarks-Runner.app
47-
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/PerformanceBenchmarks/**') }}
4833
- run: fastlane build_ios_swift_for_tests
49-
if: steps.ios-swift-cache.outputs.cache-hit != 'true'
5034
env:
5135
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
5236
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
@@ -56,7 +40,6 @@ jobs:
5640
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
5741
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
5842
- run: fastlane build_ios_benchmark_test
59-
if: steps.ios-swift-benchmark-runner-cache.outputs.cache-hit != 'true'
6043
env:
6144
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
6245
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
@@ -66,7 +49,6 @@ jobs:
6649
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
6750
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
6851
- name: Upload dSYMs
69-
if: steps.ios-swift-cache.outputs.cache-hit != 'true'
7052
run: |
7153
sentry-cli --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} upload-dif --org sentry-sdks --project sentry-cocoa DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
7254
- name: Archiving DerivedData

.github/workflows/saucelabs-UI-tests.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,7 @@ jobs:
3737
- name: Install SentryCli
3838
run: brew install getsentry/tools/sentry-cli
3939
- run: git apply ./scripts/set-device-tests-environment.patch
40-
- name: Cache iOS-Swift App and dSYM build products
41-
id: ios-swift-cache
42-
uses: actions/cache@v3
43-
with:
44-
path: |
45-
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
46-
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
47-
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}
48-
- name: Cache iOS-Swift UI Test Runner App build product
49-
id: ios-swift-uitest-runner-cache
50-
uses: actions/cache@v3
51-
with:
52-
path: |
53-
DerivedData/Build/Products/Debug-iphoneos/iOS-SwiftUITests-Runner.app
54-
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-SwiftUITests/**') }}-Xcode-${{ matrix.xcode }}
5540
- run: fastlane build_ios_swift_for_tests
56-
if: steps.ios-swift-cache.outputs.cache-hit != 'true'
5741
env:
5842
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
5943
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
@@ -63,7 +47,6 @@ jobs:
6347
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
6448
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
6549
- run: fastlane build_ios_swift_ui_test
66-
if: steps.ios-swift-uitest-runner-cache.outputs.cache-hit != 'true'
6750
env:
6851
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
6952
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
@@ -73,7 +56,6 @@ jobs:
7356
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
7457
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
7558
- name: Upload dSYMs
76-
if: steps.ios-swift-cache.outputs.cache-hit != 'true'
7759
run: |
7860
sentry-cli --auth-token ${{ secrets.SENTRY_AUTH_TOKEN }} upload-dif --org sentry-sdks --project sentry-cocoa DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
7961
- name: Archiving DerivedData

Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,9 @@
10711071
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
10721072
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
10731073
CODE_SIGN_ENTITLEMENTS = "iOS-Swift/iOS-Swift.entitlements";
1074-
CODE_SIGN_IDENTITY = "Apple Development";
1075-
CODE_SIGN_STYLE = Automatic;
1074+
CODE_SIGN_IDENTITY = "iPhone Developer";
1075+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
1076+
CODE_SIGN_STYLE = Manual;
10761077
CURRENT_PROJECT_VERSION = 1;
10771078
DEVELOPMENT_TEAM = 97JCY7859U;
10781079
INFOPLIST_FILE = "iOS-Swift/Info.plist";
@@ -1084,7 +1085,8 @@
10841085
MARKETING_VERSION = 7.25.1;
10851086
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift";
10861087
PRODUCT_NAME = "$(TARGET_NAME)";
1087-
PROVISIONING_PROFILE_SPECIFIER = "";
1088+
PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift";
1089+
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = "";
10881090
SUPPORTS_MACCATALYST = YES;
10891091
SWIFT_OBJC_BRIDGING_HEADER = "iOS-Swift/Tools/iOS-Swift-Bridging-Header.h";
10901092
SWIFT_VERSION = 5.0;
@@ -1289,8 +1291,8 @@
12891291
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
12901292
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
12911293
CODE_SIGN_ENTITLEMENTS = "iOS-SwiftClip/iOS_SwiftClip.entitlements";
1292-
CODE_SIGN_IDENTITY = "Apple Development";
1293-
CODE_SIGN_STYLE = Automatic;
1294+
CODE_SIGN_IDENTITY = "iPhone Developer";
1295+
CODE_SIGN_STYLE = Manual;
12941296
CURRENT_PROJECT_VERSION = 1;
12951297
DEVELOPMENT_TEAM = 97JCY7859U;
12961298
GENERATE_INFOPLIST_FILE = YES;
@@ -1311,7 +1313,7 @@
13111313
MARKETING_VERSION = 7.25.1;
13121314
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift.Clip";
13131315
PRODUCT_NAME = "$(TARGET_NAME)";
1314-
PROVISIONING_PROFILE_SPECIFIER = "";
1316+
PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift.Clip";
13151317
SWIFT_EMIT_LOC_STRINGS = YES;
13161318
SWIFT_VERSION = 5.0;
13171319
TARGETED_DEVICE_FAMILY = "1,2";

fastlane/Fastfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,17 @@ platform :ios do
7373
force: true
7474
)
7575

76+
sync_code_signing(
77+
type: "development",
78+
readonly: true,
79+
app_identifier: ["io.sentry.sample.iOS-Swift", "io.sentry.sample.iOS-Swift.Clip"]
80+
)
81+
7682
build_app(
7783
workspace: "Sentry.xcworkspace",
7884
scheme: "iOS-Swift",
7985
derived_data_path: "DerivedData",
80-
skip_archive: true,
81-
skip_codesigning: true
86+
skip_archive: true
8287
)
8388

8489
delete_keychain(name: "fastlane_tmp_keychain") unless is_ci

0 commit comments

Comments
 (0)