-
Notifications
You must be signed in to change notification settings - Fork 1k
63 lines (53 loc) · 1.96 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
env:
# Note: The version below should be manually updated to the latest second most recent version
# after a new stable version comes out.
flutter_n_minus_one_version: "3.24.5"
on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Does a sanity check that packages at least pass analysis on the N-1
# versions of Flutter stable if the package claims to support that version.
# This is to minimize accidentally making changes that break old versions
# (which we don't commit to supporting, but don't want to actively break)
# without updating the constraints.
lint_and_build:
strategy:
matrix:
flutter-version:
# The version of Flutter to use should use the minimum Dart SDK version supported by the package,
# refer to https://docs.flutter.dev/development/tools/sdk/releases.
- ${{ env.flutter_n_minus_one_version }}
- "3.x"
name: Checks formatting, lints, and tests this library against a specific Flutter version.
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{matrix.flutter-version}}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: 📦 Install Dependencies
run: flutter packages get
- name: ✨ Check Formatting
run: dart format --set-exit-if-changed lib
- name: 🕵️ Analyze
run: flutter analyze lib
- name: 🧪 Run Tests
run: flutter test --no-pub --coverage --test-randomize-ordering-seed random
- name: 📁 Upload coverage to Codecov
uses: codecov/codecov-action@v5