From 76e5fb9aa6fc8b62548e00456b0a49c5eb438263 Mon Sep 17 00:00:00 2001 From: Jonathan Nagayoshi Date: Sat, 27 Mar 2021 14:49:17 -0300 Subject: [PATCH] feat(flutter-ci): updated flutter-ci --- .github/workflows/flutter-ci.yaml | 45 ++++++++++++++----------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/.github/workflows/flutter-ci.yaml b/.github/workflows/flutter-ci.yaml index aa22160..bbb5117 100644 --- a/.github/workflows/flutter-ci.yaml +++ b/.github/workflows/flutter-ci.yaml @@ -1,4 +1,4 @@ -name: Dart +name: Flutter CI on: push: @@ -8,34 +8,29 @@ on: jobs: build: + # This job will run on ubuntu virtual machine runs-on: ubuntu-latest - - # Note that this workflow uses the latest stable version of the Dart SDK. - # Docker images for other release channels - like dev and beta - are also - # available. See https://hub.docker.com/r/google/dart/ for the available - # images. - container: - image: google/dart:latest - steps: - - uses: actions/checkout@v2 + # Setup Java environment in order to build the Android app. + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: "12.x" - - name: Print Dart SDK version - run: dart --version + # Setup the flutter environment. + - uses: subosito/flutter-action@v1 + with: + channel: "stable" # 'dev', 'alpha', default to: 'stable' + # flutter-version: '1.12.x' # you can also specify exact version of flutter - - name: Install dependencies - run: dart pub get + # Get flutter dependencies. + - run: flutter pub get - # Uncomment this step to verify the use of 'dart format' on each commit. - # - name: Verify formatting - # run: dart format --output=none --set-exit-if-changed . + # Check for any formatting issues in the code. + - run: flutter format --set-exit-if-changed . - # Consider passing '--fatal-infos' for slightly stricter analysis. - - name: Analyze project source - run: dart analyze + # Statically analyze the Dart code for any errors. + - run: flutter analyze . - # Your project will need to have tests in test/ and a dependency on - # package:test for this step to succeed. Note that Flutter projects will - # want to change this to 'flutter test'. - - name: Run tests - run: dart test + # Run widget tests for our flutter project. + - run: flutter test