-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.21 KB
/
flutter.yml
File metadata and controls
50 lines (42 loc) · 1.21 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
name: Flutter CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.6'
# - name: Cache Flutter dependencies
# uses: actions/cache@v3
# with:
# path: |
# ~/.pub-cache
# flutter/bin/cache
# # key: ${{ runner.os }}-pub-cache-${{ hashFiles('pubspec.yaml') }}
# key: ${{ runner.os }}-flutter-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }}
# restore-keys: |
# ${{ runner.os }}-flutter-
- name: Install dependencies
run: flutter pub get
- name: Run tests & generate coverage
run: flutter test --coverage
- name: Upload coverage to Codecov
env:
COVERAGE_KEY: ${{ secrets.COVERAGE_KEY }}
uses: codecov/codecov-action@v2
with:
files: ./coverage/lcov.info
flags: flutter
name: code-coverage-report
token: ${{ secrets.COVERAGE_KEY }}
fail_ci_if_error: true