name: genopets

on: [pull_request, push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - uses: subosito/flutter-action@v2
        with:
          flutter-version: '3.3.0'
          channel: 'stable'

      - name: Clean Dependencies
        run: flutter clean

      - name: Install Dependencies
        run: flutter packages get

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

      - name: Analyze
        run: flutter analyze lib test

      - name: Run tests
        run: flutter test --no-pub --coverage --test-randomize-ordering-seed random
