Skip to content

Instantly share code, notes, and snippets.

@zachisit
Created October 4, 2020 22:41
Show Gist options
  • Save zachisit/2e9499369e5c39d560aed5bc228483d2 to your computer and use it in GitHub Desktop.
Save zachisit/2e9499369e5c39d560aed5bc228483d2 to your computer and use it in GitHub Desktop.
GitHub Action to build and analyze Dart code and run Flutter tests
name: Build and Test
on:
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Pub Get Packages
run: flutter pub get
- name: Build AOT
run: flutter build aot
- name: Analyze Dart Code
run: flutter analyze
- name: Run Tests
run: flutter test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment