forked from sergiandreplace/flutter_rough
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (63 loc) · 1.76 KB
/
ci.yml
File metadata and controls
81 lines (63 loc) · 1.76 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches: [ master, feature/dart-3-migration ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [stable]
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.sdk }}
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
if: matrix.os == 'ubuntu-latest'
- name: Analyze project source
run: dart analyze --fatal-infos
- name: Run tests
run: flutter test --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
with:
file: coverage/lcov.info
example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: stable
channel: stable
- name: Install dependencies (root)
run: flutter pub get
- name: Install dependencies (example)
run: flutter pub get
working-directory: example
- name: Analyze example
run: dart analyze
working-directory: example
- name: Build example app
run: flutter build apk --debug
working-directory: example
publish-dry-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Publish dry run
run: dart pub publish --dry-run