-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (63 loc) · 1.89 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
flutter_version: "3.7.6"
java_version: "11.x"
jobs:
format-and-lint:
name: Linting and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: ${{ env.java_version }}
- name: Cache Flutter dependencies
uses: actions/cache@v1
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}
- uses: subosito/flutter-action@v1
with:
flutter-version: ${{ env.flutter_version }}
- name: Install dependencies
run: flutter pub get
- name: Format code
run: flutter format .
- name: Lint analysis
run: flutter analyze --no-pub
- name: Run tests
run: flutter test --coverage
# - name: Upload coverage to codecov
# uses: codecov/codecov-action@v1.2.1
# with:
# file: ./coverage/lcov.info
# token: ${{ secrets.CODECOV_TOKEN }}
# build-android:
# name: Build android client
# needs: [format-and-lint]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-java@v1
# with:
# java-version: ${{ env.java_version }}
# - name: Cache Flutter dependencies
# uses: actions/cache@v1
# with:
# path: /opt/hostedtoolcache/flutter
# key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}
# - uses: subosito/flutter-action@v1
# with:
# flutter-version: ${{ env.flutter_version }}
# - name: Install dependencies
# run: flutter pub get
# working-directory: ./example
# - name: Build
# run: flutter build apk
# working-directory: ./example
# - run: git diff --exit-code