Skip to content

Commit

Permalink
Merge branch 'main' into chore/format-and-analyze-check-only
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Sep 4, 2023
2 parents 43b2ba7 + 78eeed5 commit 09cc913
Show file tree
Hide file tree
Showing 25 changed files with 847 additions and 310 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- run: dart format --set-exit-if-changed ./

- name: dart analyze
uses: invertase/github-action-dart-analyzer@cdd8652b05bf7ed08ffce30f425436780f869f13 # pin@v1
uses: invertase/github-action-dart-analyzer@1cda5922c6369263b1c7e2fbe281f69704f4d63e # pin@v2.0.0
with:
annotate: true
fatal-infos: true
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- release/**
pull_request:
paths-ignore:
- 'logging/**'
- 'dio/**'
- 'file/**'
- 'sqflite/**'
- "logging/**"
- "dio/**"
- "file/**"
- "sqflite/**"

jobs:
cancel-previous-workflow:
Expand Down Expand Up @@ -74,10 +74,10 @@ jobs:
name: sentry
files: ./dart/coverage/lcov.info

- uses: VeryGoodOpenSource/very_good_coverage@84e5b54ab888644554e5573dca87d7f76dec9fb3 # pin@v2.0.0
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: './dart/coverage/lcov.info'
path: "./dart/coverage/lcov.info"
min_coverage: 85

analyze:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/dio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- release/**
pull_request:
paths-ignore:
- 'logging/**'
- 'flutter/**'
- 'file/**'
- 'sqflite/**'
- "logging/**"
- "flutter/**"
- "file/**"
- "sqflite/**"

jobs:
cancel-previous-workflow:
Expand All @@ -34,7 +34,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
sdk: [stable, beta]
exclude:
- os: windows-latest
- os: windows-latest
sdk: beta
- os: macos-latest
sdk: beta
Expand All @@ -57,10 +57,10 @@ jobs:
name: sentry_dio
files: ./dio/coverage/lcov.info

- uses: VeryGoodOpenSource/very_good_coverage@84e5b54ab888644554e5573dca87d7f76dec9fb3 # pin@v2.0.0
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: './dio/coverage/lcov.info'
path: "./dio/coverage/lcov.info"
min_coverage: 81

analyze:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- release/**
pull_request:
paths-ignore:
- 'logging/**'
- 'flutter/**'
- 'dio/**'
- 'sqflite/**'
- "logging/**"
- "flutter/**"
- "dio/**"
- "sqflite/**"

jobs:
cancel-previous-workflow:
Expand All @@ -34,7 +34,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
sdk: [stable, beta]
exclude:
- os: windows-latest
- os: windows-latest
sdk: beta
- os: macos-latest
sdk: beta
Expand All @@ -56,10 +56,10 @@ jobs:
name: sentry_file
files: ./file/coverage/lcov.info

- uses: VeryGoodOpenSource/very_good_coverage@84e5b54ab888644554e5573dca87d7f76dec9fb3 # pin@v2.0.0
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: './file/coverage/lcov.info'
path: "./file/coverage/lcov.info"
min_coverage: 55

analyze:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- release/**
pull_request:
paths-ignore:
- 'logging/**'
- 'dio/**'
- 'file/**'
- 'sqflite/**'
- "logging/**"
- "dio/**"
- "file/**"
- "sqflite/**"

jobs:
cancel-previous-workflow:
Expand All @@ -31,8 +31,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
target: ['ios', 'android', 'web', 'macos', 'linux', 'windows']
sdk: ['stable', 'beta']
target: ["ios", "android", "web", "macos", "linux", "windows"]
sdk: ["stable", "beta"]
exclude:
- os: ubuntu-latest
target: ios
Expand Down Expand Up @@ -69,11 +69,11 @@ jobs:
- uses: actions/setup-java@v3
if: ${{ matrix.target == 'android' }}
with:
java-version: '11'
distribution: 'adopt'
java-version: "11"
distribution: "adopt"

# Install required dependencies for Flutter on Linux on Ubuntu
- name: 'Setup Linux'
- name: "Setup Linux"
run: |
sudo apt update
sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb
Expand Down Expand Up @@ -108,12 +108,12 @@ jobs:
with:
name: sentry_flutter
file: ./flutter/coverage/lcov.info
functionalities: 'search' # remove after https://github.com/codecov/codecov-action/issues/600
functionalities: "search" # remove after https://github.com/codecov/codecov-action/issues/600

- uses: VeryGoodOpenSource/very_good_coverage@84e5b54ab888644554e5573dca87d7f76dec9fb3 # pin@v2.0.0
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
with:
path: './flutter/coverage/lcov.info'
path: "./flutter/coverage/lcov.info"
min_coverage: 90

- name: Build ${{ matrix.target }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: flutter integration tests
name: flutter native & integration test
on:
# Currently broken, enable after fixing
workflow_dispatch
# push:
# branches:
# - main
# - release/**
# pull_request:
# paths-ignore:
# - 'file/**'
push:
branches:
- main
- release/**
pull_request:
paths-ignore:
- 'file/**'

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

jobs:
cancel-previous-workflow:
Expand Down Expand Up @@ -73,6 +74,22 @@ jobs:
profile: Nexus 6
script: echo 'Generated AVD snapshot for caching.'

- name: build apk
working-directory: ./flutter/example/android
run: flutter build apk --debug

- name: launch android emulator & run android native test
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #pin@v2.28.0
with:
working-directory: ./flutter/example/android
api-level: 21
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
profile: Nexus 6
script: ./gradlew testDebugUnitTest

- name: launch android emulator & run android integration test
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #pin@v2.28.0
with:
Expand Down Expand Up @@ -110,10 +127,26 @@ jobs:
- name: flutter pub get
run: flutter pub get

- name: pod install
working-directory: ./flutter/example/ios
run: pod install

- name: launch ios simulator
id: sim
run: |
simulator_id=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-2)
echo "SIMULATOR_ID=${simulator_id}" >> "$GITHUB_OUTPUT"
xcrun simctl boot ${simulator_id}
# Disable flutter integration tests because of flaky execution
# - name: run ios integration test
# env:
# SIMULATOR_ID: ${{ steps.sim.outputs.SIMULATOR_ID }}
# run: flutter test -d "$SIMULATOR_ID" integration_test/integration_test.dart --verbose

- name: run ios native test
working-directory: ./flutter/example/ios
env:
SIMULATOR_ID: ${{ steps.sim.outputs.SIMULATOR_ID }}
run: xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=iOS Simulator,id=$SIMULATOR_ID" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO


- name: run ios integration test
run: flutter test integration_test/integration_test.dart --verbose
14 changes: 7 additions & 7 deletions .github/workflows/logging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- release/**
pull_request:
paths-ignore:
- 'dio/**'
- 'flutter/**'
- 'file/**'
- 'sqflite/**'
- "dio/**"
- "flutter/**"
- "file/**"
- "sqflite/**"

jobs:
cancel-previous-workflow:
Expand All @@ -34,7 +34,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
sdk: [stable, beta]
exclude:
- os: windows-latest
- os: windows-latest
sdk: beta
- os: macos-latest
sdk: beta
Expand All @@ -57,9 +57,9 @@ jobs:
name: sentry_logging
files: ./logging/coverage/lcov.info

- uses: VeryGoodOpenSource/very_good_coverage@84e5b54ab888644554e5573dca87d7f76dec9fb3 # pin@v2.0.0 if: runner.os == 'Linux' && matrix.sdk == 'stable'
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0 if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: './logging/coverage/lcov.info'
path: "./logging/coverage/lcov.info"
min_coverage: 90

analyze:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/sqflite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- release/**
pull_request:
paths-ignore:
- 'logging/**'
- 'flutter/**'
- 'dio/**'
- 'file/**'
- "logging/**"
- "flutter/**"
- "dio/**"
- "file/**"

jobs:
cancel-previous-workflow:
Expand All @@ -31,8 +31,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
target: ['ios', 'android', 'macos', 'linux', 'windows']
sdk: ['stable', 'beta']
target: ["ios", "android", "macos", "linux", "windows"]
sdk: ["stable", "beta"]
exclude:
- os: ubuntu-latest
target: ios
Expand Down Expand Up @@ -65,11 +65,11 @@ jobs:
- uses: actions/setup-java@v3
if: ${{ matrix.target == 'android' }}
with:
java-version: '11'
distribution: 'adopt'
java-version: "11"
distribution: "adopt"

# Install required dependencies for Flutter on Linux on Ubuntu
- name: 'Setup Linux'
- name: "Setup Linux"
run: |
sudo apt update
sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb
Expand Down Expand Up @@ -97,12 +97,12 @@ jobs:
with:
name: sentry_sqflite
file: ./sqflite/coverage/lcov.info
functionalities: 'search' # remove after https://github.com/codecov/codecov-action/issues/600
functionalities: "search" # remove after https://github.com/codecov/codecov-action/issues/600

- uses: VeryGoodOpenSource/very_good_coverage@84e5b54ab888644554e5573dca87d7f76dec9fb3 # pin@v2.0.0
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
with:
path: './sqflite/coverage/lcov.info'
path: "./sqflite/coverage/lcov.info"
min_coverage: 80

analyze:
Expand Down
3 changes: 3 additions & 0 deletions flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ android {
dependencies {
api 'io.sentry:sentry-android:6.28.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

// Required -- JUnit 4 framework
testImplementation "junit:junit:4.13.2"
}
Loading

0 comments on commit 09cc913

Please sign in to comment.