Update dependencies and configuration files #580
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: test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
flutter_channel: stable | |
java_version: 8.x | |
jobs: | |
flutter-tests: | |
name: flutter test & cov | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Pull cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
$HOME/.pub-cache | |
key: ${{ runner.OS }}-flutter-cache | |
- name: Get git infos | |
id: git-data | |
run: bash $GITHUB_WORKSPACE/CI/github_git_data.sh | |
- name: Install Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: ${{ env.flutter_channel }} | |
- name: Get dependencies | |
working-directory: app/ | |
run: flutter packages get | |
- name: Pre-build configuration | |
run: bash $GITHUB_WORKSPACE/CI/prebuild.sh | |
working-directory: app/ | |
- name: Test | |
run: flutter test | |
working-directory: app/ | |
# - name: Upload coverage to codecov | |
# uses: codecov/codecov-action@v1 | |
# with: | |
# files: app/coverage/lcov.info | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
build-android: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
name: build android | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Pull cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
$HOME/.pub-cache | |
key: ${{ runner.OS }}-flutter-cache | |
- name: Get git infos | |
id: git-data | |
run: bash $GITHUB_WORKSPACE/CI/github_git_data.sh | |
- name: Install Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: ${{ env.flutter_channel }} | |
- name: Get packages | |
working-directory: app/ | |
run: flutter packages get | |
- name: Pre-build configuration | |
working-directory: app/ | |
run: bash $GITHUB_WORKSPACE/CI/prebuild.sh | |
env: | |
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} | |
- name: Build | |
working-directory: app/ | |
run: flutter build apk --build-number ${{ env.COMMIT_NUMBER }} | |
build-ios: | |
timeout-minutes: 30 | |
name: build ios | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Pull cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.pub-cache | |
~/Library/Caches/CocoaPods | |
key: ${{ runner.OS }}-flutter-cache | |
- name: Get git infos | |
id: git-data | |
run: bash $GITHUB_WORKSPACE/CI/github_git_data.sh | |
- name: Install Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: ${{ env.flutter_channel }} | |
- name: Get packages | |
working-directory: app/ | |
run: flutter packages get | |
- name: Pre-build configuration | |
working-directory: app/ | |
run: bash $GITHUB_WORKSPACE/CI/prebuild.sh | |
- name: Build | |
working-directory: app/ | |
run: flutter build ios --build-number ${{ env.COMMIT_NUMBER }} --no-codesign | |
build-windows: | |
runs-on: windows-latest | |
timeout-minutes: 30 | |
name: build windows | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Pull cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
$HOME/.pub-cache | |
key: ${{ runner.OS }}-flutter-cache | |
- name: Get git infos | |
id: git-data | |
run: bash CI/github_git_data.sh | |
- name: Install Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: ${{ env.flutter_channel }} | |
- name: Get dependencies | |
working-directory: app/ | |
run: flutter packages get | |
- name: Pre-build configuration | |
working-directory: app/ | |
run: bash $GITHUB_WORKSPACE/CI/prebuild.sh | |
shell: bash | |
- name: Build | |
working-directory: app/ | |
run: | | |
flutter config --enable-windows-desktop | |
flutter build windows | |
- name: Upload windows executable | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-release | |
path: app/build/windows/runner/Release/ | |
build-web: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
name: build web | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Pull cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
$HOME/.pub-cache | |
key: ${{ runner.OS }}-flutter-cache | |
- name: Get git infos | |
id: git-data | |
run: bash $GITHUB_WORKSPACE/CI/github_git_data.sh | |
- name: Install Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: ${{ env.flutter_channel }} | |
- name: Get dependencies | |
working-directory: app/ | |
run: | | |
flutter config --enable-web | |
flutter packages get | |
- name: Pre-build configuration | |
working-directory: app/ | |
run: bash $GITHUB_WORKSPACE/CI/prebuild.sh | |
- name: Build | |
working-directory: app/ | |
run: flutter build web |