Skip to content

Commit 3b4be53

Browse files
committed
Merge branch 'main' into feat/spm
# Conflicts: # flutter/ios/sentry_flutter.podspec
2 parents 5f38dda + 49bd47c commit 3b4be53

File tree

303 files changed

+9233
-2967
lines changed

Some content is hidden

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

303 files changed

+9233
-2967
lines changed

.github/actions/coverage/action.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ runs:
2121
using: composite
2222

2323
steps:
24-
- name: Format coverage info
25-
if: ${{ inputs.coverage != '' }}
26-
run: dart pub run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
27-
shell: bash
28-
working-directory: ${{ inputs.directory }}
29-
3024
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # pin@v3
3125
if: ${{ inputs.coverage != '' }}
3226
with:
@@ -39,3 +33,4 @@ runs:
3933
with:
4034
path: './${{ inputs.directory }}/coverage/lcov.info'
4135
min_coverage: ${{ inputs.min-coverage }}
36+
exclude: 'lib/src/native/cocoa/binding.dart'

.github/actions/dart-test/action.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,16 @@ runs:
2323
working-directory: ${{ inputs.directory }}
2424

2525
- name: Test VM
26-
run: dart test -p vm ${{ (runner.os == 'Linux' && matrix.sdk == 'stable' && '--coverage=coverage') || '' }} --test-randomize-ordering-seed=random --chain-stack-traces
27-
shell: bash
2826
working-directory: ${{ inputs.directory }}
27+
shell: bash
28+
run: |
29+
testCmd="dart test -p vm --test-randomize-ordering-seed=random --chain-stack-traces"
30+
if ${{ (matrix.os == 'ubuntu' && matrix.sdk == 'stable' && 'true') || 'false' }} ; then
31+
$testCmd --coverage=coverage
32+
dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
33+
else
34+
$testCmd
35+
fi
2936
3037
- name: Test dart2js
3138
if: ${{ inputs.web == 'true' }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Flutter tests
2+
description: Run Flutter tests
3+
inputs:
4+
directory:
5+
description: The directory to run tests in
6+
required: false
7+
default: ''
8+
9+
runs:
10+
using: composite
11+
12+
steps:
13+
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # [email protected]
14+
with:
15+
channel: ${{ matrix.sdk }}
16+
17+
- uses: actions/setup-java@v4
18+
if: ${{ matrix.target == 'android' }}
19+
with:
20+
java-version: '17'
21+
distribution: 'adopt'
22+
23+
# Install required dependencies for Flutter on Linux on Ubuntu
24+
- name: "Setup Linux"
25+
if: matrix.target == 'linux'
26+
shell: bash
27+
run: |
28+
sudo apt-get update -qq
29+
sudo apt-get install -qq -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb libcurl4-openssl-dev network-manager upower
30+
31+
- run: flutter pub get
32+
shell: bash
33+
working-directory: ${{ inputs.directory }}
34+
35+
- name: Test VM
36+
if: matrix.target == 'linux' || matrix.target == 'windows' || matrix.target == 'macos'
37+
working-directory: ${{ inputs.directory }}
38+
shell: bash
39+
run: |
40+
testCmd="flutter test ${{ (inputs.directory == 'isar' && '-j 1') || '' }} --test-randomize-ordering-seed=random"
41+
if ${{ (matrix.target == 'linux' && matrix.sdk == 'stable' && 'true') || 'false' }} ; then
42+
$testCmd --coverage
43+
if [[ '${{ inputs.directory }}' == 'flutter' ]] ; then
44+
dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart'
45+
fi
46+
else
47+
$testCmd
48+
fi
49+
50+
- name: Test web (${{ matrix.target }})
51+
if: matrix.target == 'js' || matrix.target == 'wasm'
52+
working-directory: ${{ inputs.directory }}
53+
shell: bash
54+
run: |
55+
flutter test --platform chrome ${{ (matrix.target == 'wasm' && '--wasm') || '' }} --test-randomize-ordering-seed=random --exclude-tags canvasKit
56+
flutter test --platform chrome ${{ (matrix.target == 'wasm' && '--wasm') || '' }} --test-randomize-ordering-seed=random --tags canvasKit

.github/workflows/dart.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- '!**/*.md'
1010
- '!**/class-diagram.svg'
1111
- '.github/workflows/dart.yml'
12+
- '.github/workflows/analyze.yml'
13+
- '.github/actions/dart-test/**'
14+
- '.github/actions/coverage/**'
1215
- 'dart/**'
1316

1417
jobs:
@@ -21,7 +24,7 @@ jobs:
2124
access_token: ${{ github.token }}
2225

2326
build:
24-
name: Dart ${{matrix.sdk}} on ${{matrix.os}}
27+
name: '${{ matrix.os }} | ${{ matrix.sdk }}'
2528
runs-on: ${{ matrix.os }}-latest
2629
timeout-minutes: 30
2730
strategy:
@@ -36,6 +39,7 @@ jobs:
3639
- '3.2'
3740
- '3.3'
3841
- '3.4'
42+
- '3.5'
3943
- stable
4044
- beta
4145
include:

.github/workflows/dio.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- '!**/*.md'
1010
- '!**/class-diagram.svg'
1111
- '.github/workflows/dio.yml'
12+
- '.github/workflows/analyze.yml'
13+
- '.github/actions/dart-test/**'
14+
- '.github/actions/coverage/**'
1215
- 'dart/**'
1316
- 'dio/**'
1417

@@ -22,19 +25,15 @@ jobs:
2225
access_token: ${{ github.token }}
2326

2427
build:
25-
name: Build ${{matrix.sdk}} on ${{matrix.os}}
26-
runs-on: ${{ matrix.os }}
28+
name: '${{ matrix.os }} | ${{ matrix.sdk }}'
29+
runs-on: ${{ matrix.os }}-latest
2730
timeout-minutes: 30
2831
strategy:
2932
fail-fast: false
3033
matrix:
31-
os: [ubuntu-latest, windows-latest, macos-latest]
34+
os: [macos, ubuntu, windows]
3235
sdk: [stable, beta]
33-
exclude:
34-
- os: windows-latest
35-
sdk: beta
36-
- os: macos-latest
37-
sdk: beta
36+
3837
steps:
3938
- uses: actions/checkout@v4
4039

.github/workflows/drift.yml

Lines changed: 23 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ on:
66
- release/**
77
pull_request:
88
paths:
9-
- "!**/*.md"
10-
- "!**/class-diagram.svg"
11-
- ".github/workflows/drift.yml"
12-
- "dart/**"
13-
- "drift/**"
9+
- '!**/*.md'
10+
- '!**/class-diagram.svg'
11+
- '.github/workflows/drift.yml'
12+
- '.github/workflows/analyze.yml'
13+
- '.github/actions/flutter-test/**'
14+
- '.github/actions/coverage/**'
15+
- 'dart/**'
16+
- 'drift/**'
1417

1518
jobs:
1619
cancel-previous-workflow:
@@ -22,96 +25,36 @@ jobs:
2225
access_token: ${{ github.token }}
2326

2427
build:
25-
name: ${{ matrix.target }} | ${{ matrix.os }} | ${{ matrix.sdk }}
26-
runs-on: ${{ matrix.os }}
28+
name: '${{ matrix.target }} | ${{ matrix.sdk }}'
29+
runs-on: ${{ matrix.target == 'linux' && 'ubuntu' || matrix.target }}-latest
2730
timeout-minutes: 30
28-
defaults:
29-
run:
30-
shell: bash
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
os: [ubuntu-latest, macos-latest, windows-latest]
35-
target: ["ios", "android", "macos", "linux", "windows"]
36-
sdk: ["stable", "beta"]
37-
exclude:
38-
- os: ubuntu-latest
39-
target: ios
40-
- os: ubuntu-latest
41-
target: macos
42-
- os: ubuntu-latest
43-
target: windows
44-
- os: windows-latest
45-
target: ios
46-
- os: windows-latest
47-
target: android
48-
- os: windows-latest
49-
target: macos
50-
- os: windows-latest
51-
target: linux
52-
# macos-latest is taking hours due to limited resources
53-
- os: macos-latest
54-
target: android
55-
- os: macos-latest
56-
target: linux
57-
- os: macos-latest
58-
target: windows
59-
# Bad CPU type in executable
60-
- os: macos-latest
61-
sdk: beta
62-
# Exclude beta for windows for now until the flutter set up action does not fail anymore
63-
- os: windows-latest
64-
sdk: beta
34+
target: [macos, linux, windows]
35+
sdk: [stable, beta]
6536

6637
steps:
6738
- uses: actions/checkout@v4
6839

69-
- uses: actions/setup-java@v4
70-
if: ${{ matrix.target == 'android' }}
71-
with:
72-
java-version: "11"
73-
distribution: "adopt"
74-
75-
# Install required dependencies for Flutter on Linux on Ubuntu
76-
- name: "Setup Linux"
77-
run: |
78-
sudo apt update
79-
sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb
80-
sudo apt install -y network-manager upower
81-
if: matrix.os == 'ubuntu-latest' && matrix.target == 'linux'
40+
- name: Install libsqlite3
41+
if: matrix.target == 'linux'
42+
run: sudo apt-get -y install libsqlite3-dev
8243

83-
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # [email protected]
44+
- uses: ./.github/actions/flutter-test
8445
with:
85-
channel: ${{ matrix.sdk }}
86-
87-
- run: flutter upgrade
88-
89-
- name: Pub Get
90-
run: |
91-
cd drift
92-
flutter pub get
46+
directory: drift
9347

94-
- name: Test VM with coverage
95-
run: |
96-
cd drift
97-
flutter test --coverage --test-randomize-ordering-seed=random
98-
99-
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # pin@v3
100-
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
48+
- uses: ./.github/actions/coverage
49+
if: matrix.target == 'linux' && matrix.sdk == 'stable'
10150
with:
102-
name: sentry_drift
103-
file: ./drift/coverage/lcov.info
104-
functionalities: "search" # remove after https://github.com/codecov/codecov-action/issues/600
10551
token: ${{ secrets.CODECOV_TOKEN }}
106-
107-
- uses: VeryGoodOpenSource/very_good_coverage@c953fca3e24a915e111cc6f55f03f756dcb3964c # [email protected]
108-
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
109-
with:
110-
path: "./drift/coverage/lcov.info"
111-
min_coverage: 80
52+
directory: drift
53+
coverage: sentry_drift
54+
min-coverage: 80
11255

11356
analyze:
11457
uses: ./.github/workflows/analyze.yml
11558
with:
11659
package: drift
117-
sdk: flutter
60+
sdk: flutter

.github/workflows/e2e_dart.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- "!**/*.md"
1010
- "!**/class-diagram.svg"
1111
- ".github/workflows/e2e_dart.yml"
12+
- '.github/workflows/analyze.yml'
1213
- "dart/**"
1314
- "e2e_test/**"
1415

.github/workflows/file.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- '!**/*.md'
1010
- '!**/class-diagram.svg'
1111
- '.github/workflows/file.yml'
12+
- '.github/workflows/analyze.yml'
13+
- '.github/actions/dart-test/**'
14+
- '.github/actions/coverage/**'
1215
- 'dart/**'
1316
- 'flutter/**'
1417
- 'file/**'
@@ -23,19 +26,15 @@ jobs:
2326
access_token: ${{ github.token }}
2427

2528
build:
26-
name: Build ${{matrix.sdk}} on ${{matrix.os}}
27-
runs-on: ${{ matrix.os }}
29+
name: '${{ matrix.os }} | ${{ matrix.sdk }}'
30+
runs-on: ${{ matrix.os }}-latest
2831
timeout-minutes: 30
2932
strategy:
3033
fail-fast: false
3134
matrix:
32-
os: [ubuntu-latest, windows-latest, macos-latest]
35+
os: [macos, ubuntu, windows]
3336
sdk: [stable, beta]
34-
exclude:
35-
- os: windows-latest
36-
sdk: beta
37-
- os: macos-latest
38-
sdk: beta
37+
3938
steps:
4039
- uses: actions/checkout@v4
4140

.github/workflows/flutter-symbols.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Flutter symbols collection
22
on:
33
schedule:
44
# Run once an hour. It takes just a couple of minutes because of status caching.
5-
- cron: "10 * * * *"
5+
- cron: '10 * * * *'
66
workflow_dispatch:
77
inputs:
88
flutter_version:
99
description: Flutter version, can be either a specific version (3.17.0) or a wildcard (3.2.*)
1010
required: false
1111
type: string
12-
default: "3.*.*"
12+
default: '3.*.*'
1313

1414
defaults:
1515
run:
@@ -56,3 +56,7 @@ jobs:
5656
with:
5757
name: flutter-symbol-collector-database
5858
path: scripts/flutter_symbol_collector/.cache
59+
include-hidden-files: true
60+
overwrite: true
61+
retention-days: 90
62+
if-no-files-found: error

0 commit comments

Comments
 (0)