Skip to content

Commit

Permalink
Merge branch 'main' into feat/swift-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphofmann committed May 3, 2023
2 parents 4c77aa0 + b1b7d72 commit 50014b0
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 45 deletions.
24 changes: 24 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
codecov:
branch: main
require_ci_to_pass: yes
notify:
wait_for_ci: yes

coverage:
range: 80...100
precision: 3
round: down

ignore:
- "Tests/SentryTests"

comment:
layout: "reach,diff,flags,files,footer"
# Update, if comment exists. Otherwise post new.
behavior: default
# Comments will only post when coverage changes. Furthermore, if a comment
# already exists, and a newer commit results in no coverage change for the
# entire pull, the comment will be deleted.
require_changes: true
require_base: yes # must have a base report to post
require_head: yes # must have a head report to post
25 changes: 0 additions & 25 deletions .github/.codecov.yml

This file was deleted.

17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- 'scripts/tests-with-thread-sanitizer.sh'
- 'scripts/ci-select-xcode.sh'
- 'scripts/xcode-test.sh'
- '.codecov.yml'

# run the workflow any time an Xcode scheme changes for any tested target
- 'Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme'
Expand Down Expand Up @@ -104,9 +105,9 @@ jobs:
timeout-minutes: 15

# iOS 16
- runs-on: macos-12
- runs-on: macos-13
platform: 'iOS'
xcode: '14.2'
xcode: '14.3'
test-destination-os: 'latest'
timeout-minutes: 15

Expand All @@ -125,9 +126,9 @@ jobs:
timeout-minutes: 15

# macOS 13
- runs-on: macos-12
- runs-on: macos-13
platform: 'macOS'
xcode: '14.2'
xcode: '14.3'
test-destination-os: 'latest'
timeout-minutes: 15

Expand Down Expand Up @@ -157,9 +158,9 @@ jobs:
timeout-minutes: 15

# tvOS 16
- runs-on: macos-12
- runs-on: macos-13
platform: 'tvOS'
xcode: '14.2'
xcode: '14.3'
test-destination-os: 'latest'
timeout-minutes: 15

Expand All @@ -168,6 +169,10 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: test-server

- name: Print hardware info
run: system_profiler SPHardwareDataType

- name: Allow test-server to run
run: chmod +x ./test-server-exec
- run: ./test-server-exec &
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ on:
- '.github/workflows/testflight.yml'
- 'fastlane/**'
- 'scripts/ci-select-xcode.sh'

pull_request:
paths:
- '.github/workflows/testflight.yml'

jobs:
upload_to_testflight:
name: Build and Upload iOS-Swift to Testflight
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh 14.2
- run: ./scripts/ci-select-xcode.sh 14.3
- run: bundle install

# We upload a new version to TestFlight on every commit on main
Expand Down
8 changes: 4 additions & 4 deletions Samples/iOS-Swift/iOS-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.31.5;
MARKETING_VERSION = 8.6.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift";
Expand Down Expand Up @@ -1219,7 +1219,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.31.5;
MARKETING_VERSION = 8.6.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.sentry.sample.iOS-Swift";
Expand Down Expand Up @@ -1864,7 +1864,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.31.5;
MARKETING_VERSION = 8.6.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift.Clip";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match Development io.sentry.sample.iOS-Swift.Clip";
Expand Down Expand Up @@ -1899,7 +1899,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 7.31.5;
MARKETING_VERSION = 8.6.0;
PRODUCT_BUNDLE_IDENTIFIER = "io.sentry.sample.iOS-Swift.Clip";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.sentry.sample.iOS-Swift.Clip";
Expand Down
11 changes: 6 additions & 5 deletions Tests/SentryTests/Helper/SentryDeviceTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ - (void)testDeviceModel
const auto modelName = sentry_getDeviceModel();
XCTAssertNotEqual(modelName.length, 0U);
#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
# if defined(TESTCI) || defined(TEST)
SENTRY_ASSERT_CONTAINS(modelName, @"VMware");
# else
SENTRY_ASSERT_CONTAINS(modelName, @"Mac");
# endif // defined(TESTCI)
NSString *VMware = @"VMware";
NSString *mac = @"Mac";
BOOL containsExpectedDevice =
[modelName containsString:VMware] || [modelName containsString:mac];
XCTAssertTrue(
containsExpectedDevice, @"Expected %@ to contain either %@ or %@", modelName, VMware, mac);
#elif TARGET_OS_IOS
// We must test this branch in iOS-SwiftUITests since it must run on device, which SentryTests
// cannot.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ class SentryConcurrentRateLimitsDictionaryTests: XCTestCase {
}
}

// Even if we don't run this test below OSX 10.12 we expect the actual
// implementation to be thread safe.
@available(OSX 10.12, *)
private func getCategory(rawValue: NSNumber) -> SentryDataCategory {
func failedToCreateCategory() -> SentryDataCategory {
XCTFail("Could not create category from \(rawValue)")
Expand Down
1 change: 1 addition & 0 deletions scripts/ci-select-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# For available Xcode versions see:
# - https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md

set -euo pipefail

Expand Down

0 comments on commit 50014b0

Please sign in to comment.