Skip to content

Commit

Permalink
Merge branch 'master' into feat/2278-docc
Browse files Browse the repository at this point in the history
* master: (56 commits)
  meta: disable swiftlint file length check in TBDBClient.swift (#2435)
  Revert "test: shorten some tests (#2422)" (#2427)
  test: shorten some tests (#2422)
  test: include Sentry changes in hash keys (#2412)
  release: 7.31.2
  fix: Crash in Client when reading integrations (#2398)
  test: tooling improvements (#2400)
  fix: Don't increase session's error count for dropped events (#2374)
  Update CHANGELOG.md (#2396)
  release: 7.31.1
  Fix: Set the correct OOM event timestamp (#2394)
  test: Fix SentrySerializationTests.testSerializationFailsWithInvalidJSONObject (#2392)
  feat(hybrid-sdks): Add captureScreenshots to PrivateSDKOnly (#2384)
  ci: Increase test timeout for iOS 12 (#2391)
  test: Disable flaky testCrashReportCount1 (#2389)
  test: Disable flaky testSerializeWithUnderlyingNSException (#2387)
  build(deps): bump github/codeql-action from 2.1.31 to 2.1.32 (#2386)
  build(deps): bump fastlane from 2.210.1 to 2.211.0 (#2385)
  ref: json serialization error reporting (#2355)
  release: 7.31.0
  ...
  • Loading branch information
kevinrenskers committed Nov 24, 2022
2 parents 0af799f + 907d2ce commit 6165068
Show file tree
Hide file tree
Showing 182 changed files with 3,294 additions and 826 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-${{ hashFiles('Sentry/Sources/**') }}
- name: Cache iOS-Swift UI Test Runner App build product
id: ios-swift-benchmark-runner-cache
uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@cc7986c02bac29104a72998e67239bb5ee2ee110 # pin@v2
uses: github/codeql-action/init@4238421316c33d73aeea2801274dd286f157c2bb # pin@v2
with:
languages: ${{ matrix.language }}

Expand All @@ -35,4 +35,4 @@ jobs:
-destination platform="iOS Simulator,OS=latest,name=iPhone 11 Pro"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cc7986c02bac29104a72998e67239bb5ee2ee110 # pin@v2
uses: github/codeql-action/analyze@4238421316c33d73aeea2801274dd286f157c2bb # pin@v2
2 changes: 2 additions & 0 deletions .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
## Update internal list of formulae to the latest
- run: brew update
- name: Install Clang-Format
run: brew install clang-format
- name: Format Code
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: ./scripts/ci-select-xcode.sh
- name: Run analyze
run: xcodebuild analyze -workspace Sentry.xcworkspace -scheme Sentry -configuration Release CLANG_ANALYZER_OUTPUT=html CLANG_ANALYZER_OUTPUT_DIR=analyzer | xcpretty -t && [[ -z `find analyzer -name "*.html"` ]]
- run: make analyze

validate-podspec:
name: Validate Podspec
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/profile-data-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app
DerivedData/Build/Products/Debug-iphoneos/TrendingMovies.app.dSYM
key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}
key: trendingmovies-app-cache-key-${{ hashFiles('Samples/TrendingMovies/TrendingMovies/**') }}-${{ hashFiles('Sentry/Sources/**') }}
- name: Cache ProfileDataGenerator UI Test Runner App build product
id: cache-profiledatagenerator-test-runner-app
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/saucelabs-UI-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
path: |
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app.dSYM
DerivedData/Build/Products/Debug-iphoneos/iOS-Swift.app
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}
key: ios-swift-for-ui-testing-cache-key-${{ hashFiles('Samples/iOS-Swift/iOS-Swift/**') }}-Xcode-${{ matrix.xcode }}-${{ hashFiles('Sentry/Sources/**') }}
- name: Cache iOS-Swift UI Test Runner App build product
id: ios-swift-uitest-runner-cache
uses: actions/cache@v3
Expand Down
63 changes: 59 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: steps.cache_test_server.outputs.cache-hit != 'true'
working-directory: test-server
run: >-
swift build -c release
swift build -c release 2>&1 | tee test-server-build.log
- name: Copy exec
working-directory: test-server
Expand All @@ -50,10 +50,18 @@ jobs:
path: |
./test-server/test-server-exec
- name: Archiving Raw Test Logs
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
with:
name: test-server-build-log-${{matrix.platform}}-xcode-${{matrix.xcode}}-os-${{matrix.test-destination-os}}
path: |
raw-test-output.log
unit-tests:
name: Unit ${{matrix.platform}} - Xcode ${{matrix.xcode}} - OS ${{matrix.test-destination-os}}
runs-on: ${{matrix.runs-on}}
timeout-minutes: 15
timeout-minutes: ${{matrix.timeout-minutes}}
needs: build-test-server

strategy:
Expand All @@ -69,42 +77,50 @@ jobs:
platform: 'iOS'
xcode: '13.2.1'
test-destination-os: '12.4'
# This job needs to install the simulator which can take a couple of minutes
timeout-minutes: 25

# iOS 13.7
- runs-on: macos-11
platform: 'iOS'
xcode: '13.2.1'
test-destination-os: '13.7'
timeout-minutes: 15

# iOS 14
- runs-on: macos-11
platform: 'iOS'
xcode: '12.5.1'
test-destination-os: 'latest'
timeout-minutes: 15

# iOS 15
- runs-on: macos-12
platform: 'iOS'
xcode: '13.4.1'
test-destination-os: 'latest'
timeout-minutes: 15

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

# macOS 11
- runs-on: macos-11
platform: 'macOS'
xcode: '12.5.1'
test-destination-os: 'latest'
timeout-minutes: 15

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

# Catalyst. We only test the latest version, as
# the risk something breaking on Catalyst and not
Expand All @@ -113,18 +129,21 @@ jobs:
platform: 'Catalyst'
xcode: '13.4.1'
test-destination-os: 'latest'
timeout-minutes: 15

# tvOS 14
- runs-on: macos-11
platform: 'tvOS'
xcode: '12.5.1'
test-destination-os: 'latest'
timeout-minutes: 15

# tvOS 15
- runs-on: macos-12
platform: 'tvOS'
xcode: '13.4.1'
test-destination-os: 'latest'
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -158,7 +177,7 @@ jobs:
# passed to xcodebuild doesn't end up in the job name,
# because GitHub Actions don't provide an easy way of
# manipulating string in expressions.
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} ${{matrix.xcode}} $GITHUB_REF_NAME
run: ./scripts/xcode-test.sh ${{matrix.platform}} ${{matrix.test-destination-os}} $GITHUB_REF_NAME

- name: Archiving DerivedData Logs
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -225,7 +244,7 @@ jobs:
ui-tests:
name: UI Tests for ${{matrix.target}} on Simulators
runs-on: macos-12
strategy:
strategy:
matrix:
target: ['ios_swift', 'ios_objc', 'tvos_swift']

Expand All @@ -238,6 +257,15 @@ jobs:
run: for i in {1..2}; do fastlane ui_tests_${{matrix.target}} && break ; done
shell: sh

- name: Archiving Raw Test Logs
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
with:
name: raw-test-output-${{matrix.platform}}-xcode-${{matrix.xcode}}-os-${{matrix.test-destination-os}}
path: |
~/Library/Logs/scan/*.log
./fastlane/test_output/**
# SwiftUI only supports iOS 14+ so we run it in a separate matrix here
ui-tests-swift-ui:
name: UI Tests for SwiftUI on ${{matrix.device}} Simulator
Expand All @@ -263,6 +291,15 @@ jobs:
run: for i in {1..2}; do fastlane ui_tests_ios_swiftui device:"${{matrix.device}}" && break ; done
shell: sh

- name: Archiving Raw Test Logs
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
with:
name: raw-swiftui-test-output-${{matrix.platform}}-xcode-${{matrix.xcode}}-os-${{matrix.test-destination-os}}
path: |
~/Library/Logs/scan/*.log
./fastlane/test_output/**
# macos-11 doesn't have a simulator for iOS 12
ui-tests-swift-ios-12:
name: UI Tests on iOS 12 Simulator
Expand All @@ -286,6 +323,15 @@ jobs:
run: for i in {1..2}; do fastlane ui_tests_${{matrix.target}} device:"iPhone 8 (12.4)" address_sanitizer:false && break ; done
shell: sh

- name: Archiving Raw Test Logs
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
with:
name: raw-test-output-${{matrix.platform}}-xcode-${{matrix.xcode}}-os-${{matrix.test-destination-os}}
path: |
~/Library/Logs/scan/*.log
./fastlane/test_output/**
ui-tests-address-sanitizer:
name: UI Tests with Address Sanitizer
runs-on: macos-12
Expand All @@ -298,3 +344,12 @@ jobs:
- name: Run Fastlane
run: for i in {1..2}; do fastlane ui_tests_ios_swift device:"$iPhone 8 (15.5)" address_sanitizer:true && break ; done
shell: sh

- name: Archiving Raw Test Logs
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
with:
name: raw-test-output-${{matrix.platform}}-xcode-${{matrix.xcode}}-os-${{matrix.test-destination-os}}
path: |
~/Library/Logs/scan/*.log
./fastlane/test_output/**
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ Package.resolved

# Visual Studio Code
.vscode/

Cartfile.resolved
*.log
16 changes: 12 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@ repos:

- repo: local
hooks:
- id: clang-format
name: Clang Format
- id: format-clang
name: Format ObjC, ObjC++, C, and C++
entry: make
language: system
types_or: ["objective-c", "objective-c++", "c", "c++", "swift" ]
types_or: ["objective-c", "objective-c++", "c", "c++"]
args:
- "format"
- "format-clang"

- id: format-swift
name: Format Swift
entry: make
language: system
types_or: ["swift" ]
args:
- "format-swift"
Loading

0 comments on commit 6165068

Please sign in to comment.