-
-
Notifications
You must be signed in to change notification settings - Fork 9
59 lines (48 loc) · 1.52 KB
/
general_checks.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
name: Flutter/Dart Quality Gates (Pull-Request, Branches)
on:
push:
branches-ignore:
- main
pull_request:
permissions: read-all
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: flutter --version
- name: Install Dependencies
run: flutter pub get
- name: Verify Formatting
if: matrix.os == 'ubuntu-latest'
run: dart format -l 120 --output=none --set-exit-if-changed .
- name: Check Localizations Ordering
if: matrix.os == 'ubuntu-latest'
run: dart run grinder sort-translations
# Consider passing '--fatal-infos' for slightly stricter analysis.
#- name: Analyze Project Source
# run: flutter analyze
- name: Run All Tests
run: |
dart run grinder test --coverage > test_execution.log
dart run test_cov_console --file="./coverage/lcov.info" --total > coverage/test_total.log
- name: Generate Golden Images
if: ${{ failure() }}
run: flutter test --update-goldens test/widget
- name: Store Tests Artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: testing_logs--${{ matrix.os }}
path: |
coverage
test/widget
test_execution.log