Update build.yml #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Build Project | |
on: | |
workflow_dispatch: | |
inputs: | |
flavor: | |
description: 'Are you sure to run?' | |
required: false | |
default: 'Run all' | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- develop | |
- ED-* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup Java environment in order to build the Android app. | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '12.x' | |
distribution: 'zulu' | |
cache: 'gradle' | |
# Setup the flutter environment. | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: '3.19.2' | |
cache: true | |
# Get flutter dependencies. | |
- run: flutter clean | |
# Get flutter dependencies. | |
- run: flutter pub get | |
# Statically analyze the Dart code for any errors. | |
- run: flutter analyze . | |
# Run the tests. | |
- run: flutter test | |