-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (55 loc) · 1.44 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
64
name: CODECOV coverage upload
on:
push:
branches:
- main
pull_request:
branches:
- main
defaults:
run:
working-directory: ./beakpeek
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Cache Flutter dependancies
uses: actions/cache@v3
with:
path: |
~./.pub-cache
~./.flutter
keys: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install Flutter dependecies
run: flutter pub get
- name: Run Flutter tests
run: flutter test --coverage
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: flutter-coverage-report
path: coverage/lcov.info
codecov:
needs: test
runs-on: ubuntu-latest
steps:
- name: Download coverage artifact
uses: actions/download-artifact@v3
with:
name: flutter-coverage-report
path: coverage
- name: Upload Flutter Coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true