Skip to content

Instantly share code, notes, and snippets.

@omonimus1
Created May 30, 2022 07:10
Show Gist options
  • Save omonimus1/ec1c550ac8f41c7596f55cd854d6969c to your computer and use it in GitHub Desktop.
Save omonimus1/ec1c550ac8f41c7596f55cd854d6969c to your computer and use it in GitHub Desktop.
name: Flutter Testing
on:
push:
branches: [ develop, staging, master ]
pull_request:
branches: [ develop, staging, master ]
jobs:
enforce-timeout-minutes:
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: development
strategy:
max-parallel: 4
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Enforce timeout-minutes
uses: komiya-atsushi/[email protected]
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install Dependencies
working-directory: ./potato
run: flutter pub get
- name: Format
working-directory: ./potato
run: flutter format --set-exit-if-changed lib test
- name: Analyze
working-directory: ./potato
run: flutter analyze lib test
- name: Test app
working-directory: ./potato
run: flutter test --coverage
- uses: VeryGoodOpenSource/very_good_coverage@v1
with:
path: './potato/coverage/lcov.info'
min_coverage: 3
exclude: '**/*_observer.dart **/change.dart'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: potato/coverage/lcov.info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment