Continuous Integration #49
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
name: Continuous Integration | |
on: [pull_request,workflow_dispatch] | |
env: | |
flutter_version: "3.10.x" | |
java_version: "12.x" | |
jobs: | |
analyze: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Configuring java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.java_version }} | |
- name: Configuring flutter environment | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.flutter_version }} | |
channel: "stable" | |
- name: "Get dependencies" | |
run: flutter packages get | |
- name: "Dart Analyze" | |
run: flutter analyze | |
format: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Configuring java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.java_version }} | |
- name: Configuring flutter environment | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.flutter_version }} | |
channel: "stable" | |
- name: "Get dependencies" | |
run: flutter packages get | |
- name: "Formatter" | |
run: flutter format --set-exit-if-changed . | |
build_example: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Configuring java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.java_version }} | |
- name: Configuring flutter environment | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.flutter_version }} | |
channel: "stable" | |
- name: "Get dependencies" | |
run: flutter packages get | |
working-directory: ./example | |
- name: "Build example bundle" | |
run: flutter build appbundle | |
working-directory: ./example | |
build_example_web: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configuring java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.java_version }} | |
- name: Configuring flutter environment | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.flutter_version }} | |
channel: "stable" | |
- name: Getting dependencies | |
run: flutter packages get | |
- name: Build example website | |
run: flutter config --enable-web && cd example && flutter build web | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Configuring java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ env.java_version }} | |
- name: Configuring flutter environment | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.flutter_version }} | |
channel: "stable" | |
- name: "Get dependencies" | |
run: flutter packages get | |
- name: "Flutter Core Test" | |
run: flutter test | |
- name: "Flutter Example Test" | |
run: cd example && flutter test |