# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Clone Flutter repository with stable channel
        uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
        with:
          channel: stable
      - run: flutter doctor -v
      
      - uses: actions/checkout@v2

      - name: Install dependencies
        run: flutter pub get

      - name: Verify formatting
        run: flutter format --output=none --set-exit-if-changed .

      # Consider passing '--fatal-infos' for slightly stricter analysis.
      - name: Analyze project source
        run: flutter analyze

      - name: Run tests
        run: flutter test

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Cache Flutter dependencies
        uses: actions/cache@v1
        with:
          path: /opt/hostedtoolcache/flutter
          key: ubuntu-flutter-install-cache-stable
      
      - name: Clone Flutter repository with stable channel
        uses: subosito/flutter-action@4389e6cbc6cb8a4b18c628ff96ff90be0e926aa8
        with:
          channel: stable
      - run: flutter doctor -v
      
      - uses: actions/checkout@v2

      - name: Install dependencies
        run: flutter pub get

      - name: Verify formatting
        run: flutter format --output=none --set-exit-if-changed .

      # Consider passing '--fatal-infos' for slightly stricter analysis.
      - name: Analyze project source
        run: flutter analyze

      - name: Run tests
        run: flutter test

Add cache to Github Action
Add cache to Github Action