Skip to content

Add Flutter Test Step to CI Workflow #4

Add Flutter Test Step to CI Workflow

Add Flutter Test Step to CI Workflow #4

Workflow file for this run

name: Flutter Code Quality and Testing
# Controls when the workflow will run
on:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint_and_format:
name: "Lint and Format"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Java and Flutter
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Cache dependencies
uses: actions/[email protected]
with:
path: |
$PUB_CACHE
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Get dependencies
run: flutter pub get
- name: Run Flutter tests
run: flutter test
- name: Lint analysis
run: flutter analyze
- name: Check Dart formatting
run: dart format --set-exit-if-changed .