Skip to content

feat: drift apm

feat: drift apm #37

Workflow file for this run

name: sentry-drift
on:
push:
branches:
- main
- release/**
pull_request:
paths-ignore:
- "**/*.md"
- "logging/**"
- "flutter/**"
- "dio/**"
- "file/**"
- "sqflite/**"
jobs:
cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # pin@0.12.0
with:
access_token: ${{ github.token }}
build:
name: ${{ matrix.target }} | ${{ matrix.os }} | ${{ matrix.sdk }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
# skipping Windows for now since it requires sqlite3.dll to get working
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
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
if: ${{ matrix.target == 'android' }}
with:
java-version: "11"
distribution: "adopt"
- name: Setup SQLite
run: |
mkdir -p $HOME/sqlite
curl -L https://www.sqlite.org/2023/sqlite-dll-win64-x64-3420000.zip -o sqlite.zip
unzip sqlite.zip -d $HOME/sqlite
echo "PATH=\$HOME/sqlite:\$PATH" >> $GITHUB_ENV
if: matrix.os == 'windows-latest' && matrix.target == 'windows'
# 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'
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
channel: ${{ matrix.sdk }}
- run: flutter upgrade
- name: Pub Get
run: |
cd drift
flutter pub get
- name: Test VM with coverage
run: |
cd drift
flutter test --coverage --test-randomize-ordering-seed=random
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@v3
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
with:
name: sentry_drift
file: ./drift/coverage/lcov.info
functionalities: "search" # remove after https://github.com/codecov/codecov-action/issues/600
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
with:
path: "./drift/coverage/lcov.info"
min_coverage: 80
analyze:
uses: ./.github/workflows/analyze.yml
with:
package: drift
sdk: flutter