Skip to content

v6.0.0

v6.0.0 #178

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
workflow_call:
env:
FLUTTER_VERSION: "3.24.4"
jobs:
tests:
name: Unit tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:'
- name: Flutter doctor
run: flutter doctor -v
shell: bash
# Checkout and get packages.
- name: Checkout
uses: actions/checkout@v4
- name: Get packages
run: flutter pub get
# Analyze, check formatting, and run unit tests.
- name: Run Unit Tests
run: flutter test --coverage
- name: Upload coverage to Codecov
if: ${{ runner.os == 'Linux' }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:'
- name: Flutter doctor
run: flutter doctor -v
# Checkout and get packages.
- name: Checkout
uses: actions/checkout@v2
- run: dart pub get
- name: Format
run: dart format --set-exit-if-changed .
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:'
- name: Flutter doctor
run: flutter doctor -v
# Checkout and get packages.
- name: Checkout
uses: actions/checkout@v2
- run: dart pub get
- name: Analyze
run: dart analyze