Repository navigation
51 lines (41 loc) · 1.72 KB
/
Copy pathci.yml
File metadata and controls
51 lines (41 loc) · 1.72 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
name: CI
# Dart-level checks only — there is deliberately no Android/APK job. The ZCS
# SmartPos SDK jars (android/app/libs/) and native libs
# (android/app/src/main/jniLibs/) are proprietary, not redistributable and
# gitignored, and MainActivity.kt imports com.zcs.sdk unconditionally, so a
# Kotlin compile cannot succeed on a clean clone. See "The proprietary bits"
# in README.md. Android builds stay local, on a machine that has the SDK.
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Supersede in-flight PR runs; let every push to main keep its own status.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# pubspec only sets a floor (flutter >=3.29.0), so pin the exact release the
# project is developed against instead of following `stable` wherever it goes.
FLUTTER_VERSION: 3.44.4
jobs:
dart:
name: format + analyze + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
pub-cache: true
pub-cache-key: flutter-pub-${{ runner.os }}-${{ env.FLUTTER_VERSION }}-${{ hashFiles('pubspec.lock') }}
- run: flutter pub get
# Note: the formatter and `curly_braces_in_flow_control_structures`
# disagree about a single-statement `if` whose body is wrapped onto its
# own line — the formatter wants the wrap, the lint wants braces. Write
# the braces and both are satisfied.
- run: dart format --output=none --set-exit-if-changed .
- run: flutter analyze
- run: flutter test