diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..159299b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,51 @@ +# 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.3.10' + 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