-
-
Notifications
You must be signed in to change notification settings - Fork 28
60 lines (46 loc) · 1.49 KB
/
code-analysis.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
name: "Code Analysis"
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
- name: 🐦 Setup Flutter
uses: subosito/[email protected]
with:
flutter-version: 3.22.0
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: 📦 Install Dependencies
run: |
flutter pub global activate very_good_cli
flutter pub global activate coverage
- name: 🦄 Generate Code
run: |
dart run build_runner build --delete-conflicting-outputs
- name: Install DCM
uses: CQLabs/setup-dcm@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: ✨ Check Formatting
run: dart format --set-exit-if-changed .
- name: 🕵️ Analyze
run: flutter analyze .
- name: 🧪 Run Tests
run: flutter test --coverage --coverage-path=coverage/lcov.info --test-randomize-ordering-seed=random --concurrency=10
- name: 📈 Upload Coverage
uses: codecov/codecov-action@v3
with:
# not needed for public repos
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true