-
-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/js-sdk-integration' into feat/js-send-envelopes
- Loading branch information
Showing
66 changed files
with
849 additions
and
604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Flutter tests | ||
description: Run Flutter tests | ||
inputs: | ||
directory: | ||
description: The directory to run tests in | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # [email protected] | ||
with: | ||
channel: ${{ matrix.sdk }} | ||
|
||
- uses: actions/setup-java@v4 | ||
if: ${{ matrix.target == 'android' }} | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
|
||
# Install required dependencies for Flutter on Linux on Ubuntu | ||
- name: "Setup Linux" | ||
if: matrix.target == 'linux' | ||
shell: bash | ||
run: | | ||
sudo apt-get update -qq | ||
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 | ||
- run: flutter pub get | ||
shell: bash | ||
working-directory: ${{ inputs.directory }} | ||
|
||
- name: Test VM | ||
if: matrix.target == 'linux' || matrix.target == 'windows' || matrix.target == 'macos' | ||
working-directory: ${{ inputs.directory }} | ||
shell: bash | ||
run: | | ||
testCmd="flutter test ${{ (inputs.directory == 'isar' && '-j 1') || '' }} --test-randomize-ordering-seed=random" | ||
if ${{ (matrix.target == 'linux' && matrix.sdk == 'stable' && 'true') || 'false' }} ; then | ||
$testCmd --coverage | ||
if [[ '${{ inputs.directory }}' == 'flutter' ]] ; then | ||
dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart' | ||
fi | ||
else | ||
$testCmd | ||
fi | ||
- name: Test web (${{ matrix.target }}) | ||
if: matrix.target == 'js' || matrix.target == 'wasm' | ||
working-directory: ${{ inputs.directory }} | ||
shell: bash | ||
run: | | ||
flutter test --platform chrome ${{ (matrix.target == 'wasm' && '--wasm') || '' }} --test-randomize-ordering-seed=random --exclude-tags canvasKit | ||
flutter test --platform chrome ${{ (matrix.target == 'wasm' && '--wasm') || '' }} --test-randomize-ordering-seed=random --tags canvasKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,14 @@ on: | |
- release/** | ||
pull_request: | ||
paths: | ||
- "!**/*.md" | ||
- "!**/class-diagram.svg" | ||
- ".github/workflows/drift.yml" | ||
- "dart/**" | ||
- "drift/**" | ||
- '!**/*.md' | ||
- '!**/class-diagram.svg' | ||
- '.github/workflows/drift.yml' | ||
- '.github/workflows/analyze.yml' | ||
- '.github/actions/flutter-test/**' | ||
- '.github/actions/coverage/**' | ||
- 'dart/**' | ||
- 'drift/**' | ||
|
||
jobs: | ||
cancel-previous-workflow: | ||
|
@@ -22,96 +25,36 @@ jobs: | |
access_token: ${{ github.token }} | ||
|
||
build: | ||
name: ${{ matrix.target }} | ${{ matrix.os }} | ${{ matrix.sdk }} | ||
runs-on: ${{ matrix.os }} | ||
name: '${{ matrix.target }} | ${{ matrix.sdk }}' | ||
runs-on: ${{ matrix.target == 'linux' && 'ubuntu' || matrix.target }}-latest | ||
timeout-minutes: 30 | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
target: ["ios", "android", "macos", "linux", "windows"] | ||
sdk: ["stable", "beta"] | ||
exclude: | ||
- os: ubuntu-latest | ||
target: ios | ||
- os: ubuntu-latest | ||
target: macos | ||
- os: ubuntu-latest | ||
target: windows | ||
- os: windows-latest | ||
target: ios | ||
- os: windows-latest | ||
target: android | ||
- os: windows-latest | ||
target: macos | ||
- os: windows-latest | ||
target: linux | ||
# macos-latest is taking hours due to limited resources | ||
- os: macos-latest | ||
target: android | ||
- os: macos-latest | ||
target: linux | ||
- os: macos-latest | ||
target: windows | ||
# Bad CPU type in executable | ||
- os: macos-latest | ||
sdk: beta | ||
# Exclude beta for windows for now until the flutter set up action does not fail anymore | ||
- os: windows-latest | ||
sdk: beta | ||
target: [macos, linux, windows] | ||
sdk: [stable, beta] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
if: ${{ matrix.target == 'android' }} | ||
with: | ||
java-version: "11" | ||
distribution: "adopt" | ||
|
||
# Install required dependencies for Flutter on Linux on Ubuntu | ||
- 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 | ||
sudo apt install -y network-manager upower | ||
if: matrix.os == 'ubuntu-latest' && matrix.target == 'linux' | ||
- name: Install libsqlite3 | ||
if: matrix.target == 'linux' | ||
run: sudo apt-get -y install libsqlite3-dev | ||
|
||
- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # [email protected] | ||
- uses: ./.github/actions/flutter-test | ||
with: | ||
channel: ${{ matrix.sdk }} | ||
|
||
- run: flutter upgrade | ||
|
||
- name: Pub Get | ||
run: | | ||
cd drift | ||
flutter pub get | ||
directory: drift | ||
|
||
- name: Test VM with coverage | ||
run: | | ||
cd drift | ||
flutter test --coverage --test-randomize-ordering-seed=random | ||
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # pin@v3 | ||
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux' | ||
- uses: ./.github/actions/coverage | ||
if: matrix.target == 'linux' && matrix.sdk == 'stable' | ||
with: | ||
name: sentry_drift | ||
file: ./drift/coverage/lcov.info | ||
functionalities: "search" # remove after https://github.com/codecov/codecov-action/issues/600 | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- uses: VeryGoodOpenSource/very_good_coverage@c953fca3e24a915e111cc6f55f03f756dcb3964c # [email protected] | ||
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux' | ||
with: | ||
path: "./drift/coverage/lcov.info" | ||
min_coverage: 80 | ||
directory: drift | ||
coverage: sentry_drift | ||
min-coverage: 80 | ||
|
||
analyze: | ||
uses: ./.github/workflows/analyze.yml | ||
with: | ||
package: drift | ||
sdk: flutter | ||
sdk: flutter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.