Skip to content

tmp

tmp #160

Workflow file for this run

name: Run tests
on:
pull_request:
types:
- opened
- synchronize
- reopened
push:
branches:
- main
schedule:
- cron: "0 0 * * 0" # Run on Sundays
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Restore Dart cache
id: restore-dart-cache
uses: actions/cache/restore@v3
with:
path: .dart_tool
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}-
- run: flutter pub get --enforce-lockfile
- run: dart format --set-exit-if-changed .
- run: dart run build_runner build # Generate mocks
- run: flutter analyze .
- run: flutter test
- name: Save Dart cache
uses: actions/cache/save@v3
with:
path: .dart_tool
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}-${{ github.run_id }}