Implement bug reporting #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |