# SPDX-FileCopyrightText: 2024 Foundation Devices Inc.
#
# SPDX-License-Identifier: MIT

on:
  pull_request:
  push:
    branches:
      - main

name: Check and Lint

jobs:
  Flutter:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 4.1.0
      - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # 2.16.0
      - name: Pub Get
        run: dart pub get --no-precompile
        working-directory: build_tool
      - name: Dart Format
        run: dart format . --output=none --set-exit-if-changed
        working-directory: build_tool
      - name: Analyze
        run: dart analyze
        working-directory: build_tool
      - name: Test
        run: flutter test
        working-directory: build_tool
