-
Notifications
You must be signed in to change notification settings - Fork 45
68 lines (66 loc) · 2.07 KB
/
flutter.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
60
61
62
63
64
65
66
67
68
name: Flutter
permissions:
contents: read
pull-requests: read
on:
pull_request:
paths:
- 'flutter/**'
- 'android/measure/api/**'
push:
branches:
- 'main'
paths:
- 'flutter/**'
- 'android/measure/api/**'
- 'ios/Sources/MeasureSDK/Swift/Measure.swift'
tags:
- 'flutter-*'
env:
JAVA_VERSION: 17
JAVA_DISTRIBUTION: 'temurin'
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
flutter-checks:
name: Flutter checks
runs-on: macos-latest
defaults:
run:
working-directory: flutter/measure_flutter
timeout-minutes: 15
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
with:
channel: stable
flutter-version: 3.29.0
- name: Pub get
run: flutter pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: flutter analyze
- name: Flutter tests
run: flutter test
- name: Android checks
uses: actions/setup-java@v3
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: 'gradle'
- name: Check Gradle wrapper
uses: gradle/actions/wrapper-validation@82758ea0fa86a76afcbc6f0f6d021368407ccee5
- name: Publish measure to maven local
run: ../../android/gradlew --project-dir ../../android/ :measure:publishToMavenLocal
- name: Run all checks
run: ./example/android/gradlew --project-dir ./example/android :measure_flutter:check
- name: Run SwiftLint
uses: cirruslabs/swiftlint-action@fdc2695c66b8807e7b1571d08097a99cf1fde41b
with:
version: latest
directory: ios
- name: Run iOS tests
run: xcodebuild test -workspace example/ios/Runner.xcworkspace -scheme Runner -destination "platform=iOS Simulator,OS=18.2,name=iPhone 16 Pro Max"