File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Dart CI
2+ on :
3+ push :
4+ branches : [main]
5+ pull_request :
6+ branches : [main]
7+ workflow_dispatch :
8+
9+ jobs :
10+ format :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Flutter
17+ uses : subosito/flutter-action@v2
18+ with :
19+ channel : stable
20+ cache : true
21+
22+ - name : Install dependencies
23+ run : flutter pub get
24+
25+ - name : Check code formatting
26+ run : dart format --set-exit-if-changed .
27+
28+ analyze :
29+ runs-on : ubuntu-latest
30+ steps :
31+ - name : Checkout repository
32+ uses : actions/checkout@v4
33+
34+ - name : Setup Flutter
35+ uses : subosito/flutter-action@v2
36+ with :
37+ channel : stable
38+ cache : true
39+
40+ - name : Install dependencies
41+ run : flutter pub get
42+
43+ - name : Run linter
44+ run : dart analyze --fatal-infos .
45+
46+ test :
47+ runs-on : ubuntu-latest
48+ steps :
49+ - name : Checkout repository
50+ uses : actions/checkout@v4
51+
52+ - name : Setup Flutter
53+ uses : subosito/flutter-action@v2
54+ with :
55+ channel : stable
56+ cache : true
57+
58+ - name : Install dependencies
59+ run : flutter pub get
60+
61+ - name : Run tests with coverage
62+ run : flutter test --coverage
63+
64+ - name : Upload coverage reports to Codecov
65+ uses : codecov/codecov-action@v5
66+ with :
67+ token : ${{ secrets.CODECOV_TOKEN }}
68+ files : ./coverage/lcov.info
69+ fail_ci_if_error : false
70+ verbose : true
You can’t perform that action at this time.
0 commit comments