Skip to content

Add tags and exclude-tags support #2740

Add tags and exclude-tags support

Add tags and exclude-tags support #2740

Workflow file for this run

name: patrol prepare
on:
workflow_dispatch:
pull_request:
paths:
- 'packages/patrol/**'
jobs:
prepare-android-on-windows:
runs-on: ${{ matrix.os }}
name: Android on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
flutter-version: ['3.22.x']
flutter-channel: ['stable']
defaults:
run:
working-directory: packages/patrol/example/android
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}
- name: Preload Flutter artifacts
run: flutter precache --android
- name: Generate Gradle wrapper
working-directory: packages/patrol/example
run: flutter build apk --config-only
- name: ktlint check
run: .\gradlew.bat :patrol:ktlintCheck
- name: ktlint format
run: .\gradlew.bat :patrol:ktlintFormat
- name: Build app with Gradle
run: .\gradlew.bat :app:assembleDebug
- name: Build app with Flutter tool
run: flutter build apk --debug --flavor dev
prepare-android-on-linux:
runs-on: ${{ matrix.os }}
name: Android on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
flutter-version: ['3.22.x']
flutter-channel: ['stable']
defaults:
run:
working-directory: packages/patrol/example/android
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}
- name: Preload Flutter artifacts
run: flutter precache --android
- name: Generate Gradle wrapper
working-directory: packages/patrol/example
run: flutter build apk --config-only
- name: Run unit tests
if: success() || failure()
run: ./gradlew :patrol:testDebug
- name: ktlint check
if: success() || failure()
run: ./gradlew :patrol:ktlintCheck
- name: ktlint format
if: success() || failure()
run: ./gradlew :patrol:ktlintFormat
- name: Build example app with Gradle
run: ./gradlew :app:assembleDebug
- name: Build example app with Flutter tool
run: flutter build apk --debug --flavor dev
prepare-darwin:
runs-on: ${{ matrix.os }}
name: darwin on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-13]
flutter-version: ['3.22.x']
flutter-channel: ['stable']
defaults:
run:
working-directory: packages/patrol/darwin
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Install tools
run: |
brew update
brew install swift-format
brew install clang-format
brew install xcbeautify
# Disabled because of generated protobuf code
- name: swift-format lint
run: test -z $(swift-format lint --recursive --strict .)
- name: swift-format format
if: success() || failure()
run: |
swift-format format --recursive --in-place .
git update-index --refresh
git diff-index --quiet HEAD --
- name: clang-format
if: success() || failure()
run: |
find . -iname '*.h' -o -iname '*.m' | xargs -I {} clang-format --dry-run --Werror {}
prepare-flutter:
name: Flutter ${{ matrix.flutter-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flutter-version: ['3.22.x']
flutter-channel: ['stable']
defaults:
run:
working-directory: packages/patrol
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: ${{ matrix.flutter-channel }}
- name: Set up Melos and activate workspace
working-directory: .
run: |
dart pub global activate melos
melos bootstrap
- name: flutter pub get
run: flutter pub get
- name: flutter test
if: success() || failure()
run: flutter test
- name: Run analyzer
if: success() || failure()
run: |
flutter analyze
dart run custom_lint
- name: dart format
if: success() || failure()
run: dart format --set-exit-if-changed .
- name: flutter pub publish --dry-run
if: success() || failure()
run: flutter pub publish --dry-run
- name: flutter pub get (example app)
if: success() || failure()
working-directory: ./packages/patrol/example
run: flutter pub get