1+ name : sentry-drift
2+ on :
3+ push :
4+ branches :
5+ - main
6+ - release/**
7+ pull_request :
8+ paths-ignore :
9+ - " **/*.md"
10+ - " logging/**"
11+ - " flutter/**"
12+ - " dio/**"
13+ - " file/**"
14+ - " sqflite/**"
15+
16+ jobs :
17+ cancel-previous-workflow :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Cancel Previous Runs
21+ uses : styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # pin@0.12.0
22+ with :
23+ access_token : ${{ github.token }}
24+
25+ build :
26+ name : ${{ matrix.target }} | ${{ matrix.os }} | ${{ matrix.sdk }}
27+ runs-on : ${{ matrix.os }}
28+ timeout-minutes : 30
29+ defaults :
30+ run :
31+ shell : bash
32+ strategy :
33+ fail-fast : false
34+ matrix :
35+ os : [ubuntu-latest, macos-latest, windows-latest]
36+ target : ["ios", "android", "macos", "linux", "windows"]
37+ sdk : ["stable", "beta"]
38+ exclude :
39+ - os : ubuntu-latest
40+ target : ios
41+ - os : ubuntu-latest
42+ target : macos
43+ - os : ubuntu-latest
44+ target : windows
45+ - os : windows-latest
46+ target : ios
47+ - os : windows-latest
48+ target : android
49+ - os : windows-latest
50+ target : macos
51+ - os : windows-latest
52+ target : linux
53+ # macos-latest is taking hours due to limited resources
54+ - os : macos-latest
55+ target : android
56+ - os : macos-latest
57+ target : linux
58+ - os : macos-latest
59+ target : windows
60+ # Bad CPU type in executable
61+ - os : macos-latest
62+ sdk : beta
63+
64+ steps :
65+ - uses : actions/checkout@v4
66+
67+ - uses : actions/setup-java@v3
68+ if : ${{ matrix.target == 'android' }}
69+ with :
70+ java-version : " 11"
71+ distribution : " adopt"
72+
73+ # Install required dependencies for Flutter on Linux on Ubuntu
74+ - name : " Setup Linux"
75+ run : |
76+ sudo apt update
77+ sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb
78+ sudo apt install -y network-manager upower
79+ if : matrix.os == 'ubuntu-latest' && matrix.target == 'linux'
80+
81+ - uses : subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
82+ with :
83+ channel : ${{ matrix.sdk }}
84+
85+ - run : flutter upgrade
86+
87+ - name : Pub Get
88+ run : |
89+ cd drift
90+ flutter pub get
91+
92+ - name : Test VM with coverage
93+ run : |
94+ cd drift
95+ flutter test --coverage --test-randomize-ordering-seed=random
96+
97+ - uses : codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@v3
98+ if : runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
99+ with :
100+ name : sentry_drift
101+ file : ./drift/coverage/lcov.info
102+ functionalities : " search" # remove after https://github.com/codecov/codecov-action/issues/600
103+
104+ - uses : VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
105+ if : runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
106+ with :
107+ path : " ./drift/coverage/lcov.info"
108+ min_coverage : 80
109+
110+ analyze :
111+ uses : ./.github/workflows/analyze.yml
112+ with :
113+ package : drift
114+ sdk : flutter
0 commit comments