-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 1.97 KB
/
Copy pathci.yml
File metadata and controls
69 lines (63 loc) · 1.97 KB
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
68
69
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel superseded runs on the same ref (saves minutes on rapid pushes).
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
# Pin the Flutter version the project targets. Dart ^3.12.2 ↔ Flutter 3.44.x.
# Bump this together with pubspec.yaml's sdk constraint.
env:
FLUTTER_VERSION: '3.44.6'
jobs:
analyze:
name: Analyze (strict)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
# --fatal-infos: any issue (incl. info-level lints) fails the gate.
- run: flutter analyze --fatal-infos
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
# NOTE: test/*_smoke_test.dart hit a local opencode server at
# localhost:15120 and skip gracefully when it's unreachable, so in CI
# (no server) they effectively no-op; only the pure widget test runs.
# Make this gate meaningful by adding the unit tests in plan §5
# (mocked repos, SSE/diff parser, lastMessage synthesizer).
- run: flutter test
build-apk:
name: Build APK (debug)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- run: flutter pub get
- run: flutter build apk --debug
- uses: actions/upload-artifact@v5
with:
name: apk-debug
path: build/app/outputs/flutter-apk/*.apk
if-no-files-found: error