-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (34 loc) · 1.02 KB
/
dart-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
name: Dart CI
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- uses: invertase/github-action-dart-analyzer@v1
with:
fatal-infos: true
- name: Flutter Analyze project source
run: flutter analyze .
- name: Run tests
run: |
dart pub global activate coverage 1.5.0
dart test --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
- uses: codecov/codecov-action@v3
with:
verbose: true
files: ./coverage/lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}