name: camera_platform_interface

on:
  pull_request:
    paths:
      - "packages/camera/camera_platform_interface/**"
      - ".github/workflows/camera_platform_interface.yaml"

jobs:
  build:
    defaults:
      run:
        working-directory: packages/camera/camera_platform_interface
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: subosito/flutter-action@v1.5.0
        with:
          channel: master

      - name: Install Dependencies
        run: flutter packages get

      - name: Format
        run: flutter format --set-exit-if-changed lib

      - name: Analyze
        run: flutter analyze lib
