Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 11 additions & 11 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ targets:
# See https://github.com/getsentry/sentry-dart/pull/2113 for more context
skipValidation: true
packages:
dart:
flutter:
logging:
dio:
file:
sqflite:
hive:
drift:
isar:
link:
firebase_remote_config:
packages/dart:
packages/flutter:
packages/logging:
packages/dio:
packages/file:
packages/sqflite:
packages/hive:
packages/drift:
packages/isar:
packages/link:
packages/firebase_remote_config:
- name: github
- name: registry
sdks:
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/flutter-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ runs:
env:
INPUT_DIRECTORY: ${{ inputs.directory }}
run: |
if [[ "$INPUT_DIRECTORY" == 'isar' ]]; then
if [[ "$INPUT_DIRECTORY" == 'packages/isar' ]]; then
testCmd="flutter test -j 1 --test-randomize-ordering-seed=random"
else
testCmd="flutter test --test-randomize-ordering-seed=random"
fi

if ${{ (matrix.target == 'linux' && matrix.sdk == 'stable' && 'true') || 'false' }} ; then
$testCmd --coverage
if [[ "$INPUT_DIRECTORY" == 'flutter' ]] ; then
if [[ "$INPUT_DIRECTORY" == 'packages/flutter' ]]; then
dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart'
fi
else
Expand Down
14 changes: 7 additions & 7 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This is used by the action https://github.com/dorny/paths-filter

high_risk_code: &high_risk_code
- "flutter/lib/src/span_frame_metrics_collector.dart"
- "flutter/lib/src/integrations/native_app_start_integration.dart"
- "flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt"
- "flutter/ios/Classes/SentryFlutterPluginApple.swift"
- "flutter/lib/src/screenshot/recorder.dart"
- "flutter/lib/src/screenshot/widget_filter.dart"
- "flutter/lib/src/native/java/android_replay_recorder.dart"
- "packages/flutter/lib/src/span_frame_metrics_collector.dart"
- "packages/flutter/lib/src/integrations/native_app_start_integration.dart"
- "packages/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt"
- "packages/flutter/ios/Classes/SentryFlutterPluginApple.swift"
- "packages/flutter/lib/src/screenshot/recorder.dart"
- "packages/flutter/lib/src/screenshot/widget_filter.dart"
- "packages/flutter/lib/src/native/java/android_replay_recorder.dart"
4 changes: 2 additions & 2 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- run: flutter pub get
if: ${{ inputs.package == 'flutter' }}
working-directory: flutter/microbenchmarks
working-directory: packages/flutter/microbenchmarks

- run: dart format --set-exit-if-changed ./

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
if: ${{ inputs.package == 'flutter' }}
working-directory: ${{ inputs.package }}
run: |
sed -i.bak 's|sentry:.*|sentry:\n path: /github/workspace/dart|g' pubspec.yaml
sed -i.bak 's|sentry:.*|sentry:\n path: /github/workspace/packages/dart|g' pubspec.yaml
- uses: axel-op/dart-package-analyzer@56afb7e6737bd2b7cee05382ae7f0e8111138080 # pin@v3
id: analysis
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '.github/workflows/analyze.yml'
- '.github/actions/dart-test/**'
- '.github/actions/coverage/**'
- 'dart/**'
- 'packages/dart/**'

jobs:
cancel-previous-workflow:
Expand Down Expand Up @@ -45,24 +45,24 @@ jobs:

- uses: ./.github/actions/dart-test
with:
directory: dart
directory: packages/dart

- uses: ./.github/actions/coverage
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: dart
directory: packages/dart
coverage: sentry
min-coverage: 85

- name: Build example
working-directory: dart/example
working-directory: packages/dart/example
run: |
dart pub get
dart compile aot-snapshot bin/example.dart

analyze:
uses: ./.github/workflows/analyze.yml
with:
package: dart
package: packages/dart
panaThreshold: 87
10 changes: 5 additions & 5 deletions .github/workflows/dio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
- '.github/workflows/analyze.yml'
- '.github/actions/dart-test/**'
- '.github/actions/coverage/**'
- 'dart/**'
- 'dio/**'
- 'packages/dart/**'
- 'packages/dio/**'

jobs:
cancel-previous-workflow:
Expand All @@ -39,17 +39,17 @@ jobs:

- uses: ./.github/actions/dart-test
with:
directory: dio
directory: packages/dio

- uses: ./.github/actions/coverage
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: dio
directory: packages/dio
coverage: sentry_dio
min-coverage: 81

analyze:
uses: ./.github/workflows/analyze.yml
with:
package: dio
package: packages/dio
39 changes: 25 additions & 14 deletions .github/workflows/drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:
- '!**/class-diagram.svg'
- '.github/workflows/drift.yml'
- '.github/workflows/analyze.yml'
- '.github/actions/flutter-test/**'
- '.github/actions/dart-test/**'
- '.github/actions/coverage/**'
- 'dart/**'
- 'drift/**'
- 'packages/dart/**'
- 'packages/drift/**'

jobs:
cancel-previous-workflow:
Expand All @@ -25,36 +25,47 @@ jobs:
access_token: ${{ github.token }}

build:
name: '${{ matrix.target }} | ${{ matrix.sdk }}'
runs-on: ${{ matrix.target == 'linux' && 'ubuntu' || matrix.target }}-latest
name: '${{ matrix.os }} | ${{ matrix.sdk }}'
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
target: [macos, linux, windows]
os: [ubuntu, macos, windows]
sdk: [stable, beta]

steps:
- uses: actions/checkout@v4

- name: Install libsqlite3
if: matrix.target == 'linux'
- name: Install libsqlite3 (Ubuntu)
if: matrix.os == 'ubuntu'
run: sudo apt-get -y install libsqlite3-dev

- uses: ./.github/actions/flutter-test
- name: Install SQLite (macOS)
if: matrix.os == 'macos'
run: brew install sqlite3

- name: Install SQLite (Windows)
if: matrix.os == 'windows'
shell: powershell
run: |
choco install sqlite -y
echo "C:/ProgramData/chocolatey/lib/sqlite/tools" >> $GITHUB_PATH

- uses: ./.github/actions/dart-test
with:
directory: drift
directory: packages/drift
web: 'false'

- uses: ./.github/actions/coverage
if: matrix.target == 'linux' && matrix.sdk == 'stable'
if: matrix.os == 'ubuntu' && matrix.sdk == 'stable'
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: drift
directory: packages/drift
coverage: sentry_drift
min-coverage: 80

analyze:
uses: ./.github/workflows/analyze.yml
with:
package: drift
sdk: flutter
package: packages/drift
4 changes: 2 additions & 2 deletions .github/workflows/e2e_dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- "!**/*.md"
- "!**/class-diagram.svg"
- ".github/workflows/e2e_dart.yml"
- '.github/workflows/analyze.yml'
- "dart/**"
- ".github/workflows/analyze.yml"
- "packages/dart/**"
- "e2e_test/**"

env:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ on:
- '.github/workflows/analyze.yml'
- '.github/actions/dart-test/**'
- '.github/actions/coverage/**'
- 'dart/**'
- 'flutter/**'
- 'file/**'
- 'packages/dart/**'
- 'packages/file/**'

jobs:
cancel-previous-workflow:
Expand All @@ -40,19 +39,19 @@ jobs:

- uses: ./.github/actions/dart-test
with:
directory: file
directory: packages/file
web: false

- uses: ./.github/actions/coverage
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: file
directory: packages/file
coverage: sentry_file
min-coverage: 55

analyze:
uses: ./.github/workflows/analyze.yml
with:
package: file
package: packages/file
panaThreshold: 90
10 changes: 5 additions & 5 deletions .github/workflows/firebase_remote_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
- '.github/workflows/analyze.yml'
- '.github/actions/dart-test/**'
- '.github/actions/coverage/**'
- 'dart/**'
- 'flutter/**'
- 'firebase_remote_config/**'
- 'packages/dart/**'
- 'packages/flutter/**'
- 'packages/firebase_remote_config/**'

# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
Expand All @@ -37,7 +37,7 @@ jobs:

- uses: ./.github/actions/flutter-test
with:
directory: firebase_remote_config
directory: packages/firebase_remote_config
web: false

# TODO: don't set coverage for now to finish publishing it
Expand All @@ -52,5 +52,5 @@ jobs:
analyze:
uses: ./.github/workflows/analyze.yml
with:
package: firebase_remote_config
package: packages/firebase_remote_config
sdk: flutter
24 changes: 12 additions & 12 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
- '.github/actions/coverage/**'
- '!**/*.md'
- '!**/class-diagram.svg'
- 'dart/**'
- 'flutter/**'
- 'packages/dart/**'
- 'packages/flutter/**'
- 'metrics/flutter.properties'

jobs:
Expand Down Expand Up @@ -61,20 +61,20 @@ jobs:

- uses: ./.github/actions/flutter-test
with:
directory: flutter
directory: packages/flutter

- uses: ./.github/actions/coverage
if: matrix.target == 'linux' && matrix.sdk == 'stable'
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: flutter
directory: packages/flutter
coverage: sentry_flutter
min-coverage: 90

- name: Build example for ${{ matrix.target }}
# The example currently doesn't support compiling for WASM. Should be OK once we add package:web in v9.
if: matrix.target != 'wasm'
working-directory: flutter/example
working-directory: packages/flutter/example
shell: bash
run: |
flutter config --enable-windows-desktop
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: flutter/example
working-directory: packages/flutter/example
strategy:
fail-fast: false
matrix:
Expand All @@ -136,7 +136,7 @@ jobs:
analyze:
uses: ./.github/workflows/analyze.yml
with:
package: flutter
package: packages/flutter
sdk: flutter
panaThreshold: 87

Expand All @@ -145,7 +145,7 @@ jobs:
timeout-minutes: 20
defaults:
run:
working-directory: ./flutter
working-directory: packages/flutter
steps:
- uses: actions/checkout@v4
# https://github.com/CocoaPods/CocoaPods/issues/5275#issuecomment-315461879
Expand All @@ -156,7 +156,7 @@ jobs:
timeout-minutes: 20
defaults:
run:
working-directory: ./flutter
working-directory: packages/flutter
steps:
- uses: actions/checkout@v4
- uses: norio-nomura/action-swiftlint@9f4dcd7fd46b4e75d7935cf2f4df406d5cae3684 # [email protected]
Expand All @@ -168,7 +168,7 @@ jobs:
timeout-minutes: 20
defaults:
run:
working-directory: ./flutter
working-directory: packages/flutter
steps:
- uses: actions/checkout@v4

Expand All @@ -185,7 +185,7 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
# To recreate baseline run: detekt -i flutter/android,flutter/example/android -b flutter/config/detekt-bl.xml -cb
# To recreate baseline run: detekt -i packages/flutter/android,packages/flutter/example/android -b packages/flutter/config/detekt-bl.xml -cb
- uses: natiginfo/action-detekt-all@45229fbbe47eaff1160b6c956d7ffe14dc23c206 # [email protected]
with:
args: -i flutter/android,flutter/example/android --baseline flutter/config/detekt-bl.xml --jvm-target 1.8 --build-upon-default-config --all-rules
args: -i packages/flutter/android,packages/flutter/example/android --baseline packages/flutter/config/detekt-bl.xml --jvm-target 1.8 --build-upon-default-config --all-rules
Loading
Loading