Skip to content

Commit 072e70d

Browse files
committed
Add GitHub Actions CI workflow for lint and test
Runs flutter analyze (fatal warnings/infos) and flutter test --coverage on push/PR to main, master, and develop branches. Uses Flutter 3.41.6 (from .fvmrc) with dependency caching and uploads coverage artifact. https://claude.ai/code/session_011cEYpuo76EMamkGvpnuPNZ
1 parent 46f0759 commit 072e70d

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main", "master", "develop", "claude/**"]
6+
pull_request:
7+
branches: ["main", "master", "develop"]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
analyze:
15+
name: Lint & Analyze
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: subosito/flutter-action@v2
21+
with:
22+
flutter-version: "3.41.6"
23+
channel: "stable"
24+
cache: true
25+
26+
- name: Install dependencies
27+
run: flutter pub get
28+
29+
- name: Run analyzer
30+
run: flutter analyze --fatal-infos --fatal-warnings
31+
32+
test:
33+
name: Tests
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- uses: subosito/flutter-action@v2
39+
with:
40+
flutter-version: "3.41.6"
41+
channel: "stable"
42+
cache: true
43+
44+
- name: Install dependencies
45+
run: flutter pub get
46+
47+
- name: Run tests
48+
run: flutter test --coverage
49+
50+
- name: Upload coverage report
51+
uses: actions/upload-artifact@v4
52+
if: always()
53+
with:
54+
name: coverage-report
55+
path: coverage/lcov.info
56+
retention-days: 7

0 commit comments

Comments
 (0)