release: 0.11.0 (#272) #1059
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: CI | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
permissions: | |
pull-requests: write | |
jobs: | |
get-flutter-version: | |
runs-on: ubuntu-latest | |
outputs: | |
flutter-version: ${{ steps.get-flutter-version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Flutter version from .fvmrc | |
id: get-flutter-version | |
run: > | |
echo version=$(grep flutter .fvmrc | cut -d ":" -f2|cut -d "\"" -f2) | |
>> $GITHUB_OUTPUT | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Format | |
run: > | |
dart format | |
$(find . -name '*.dart' -not -name '*.g.dart' -and -not -name '*.freezed.dart') | |
- name: Suggest changes | |
if: github.event_name == 'pull_request' | |
uses: reviewdog/action-suggester@v1 | |
with: | |
fail_on_error: true | |
- name: Check diff | |
if: github.event_name != 'pull_request' | |
run: git diff --exit-code | |
analyze: | |
runs-on: ubuntu-latest | |
needs: get-flutter-version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{ needs.get-flutter-version.outputs.flutter-version }} | |
cache: true | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Analyze | |
uses: invertase/github-action-dart-analyzer@v3 | |
with: | |
fatal-infos: true | |
custom-lint: true | |
test: | |
runs-on: ubuntu-latest | |
needs: get-flutter-version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{ needs.get-flutter-version.outputs.flutter-version }} | |
cache: true | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Test | |
run: flutter test | |
integration-test-ios: | |
runs-on: macos-14 | |
needs: get-flutter-version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{ needs.get-flutter-version.outputs.flutter-version }} | |
cache: true | |
- name: Get dependencies | |
run: flutter pub get | |
- name: Start simulator | |
uses: futureware-tech/simulator-action@v3 | |
with: | |
model: 'iPhone 14' | |
- name: Pre-build the app | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 30 | |
max_attempts: 5 | |
command: > | |
flutter build ios --simulator | |
--target=integration_test/timeline_test.dart | |
- name: Integration test | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 30 | |
max_attempts: 3 | |
command: flutter test integration_test | |
check-i18n-sorting: | |
runs-on: ubuntu-latest | |
needs: get-flutter-version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get changed i18n files | |
id: changed-i18n-files | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: lib/i18n/aria/*.i18n.yaml | |
- name: Install Flutter | |
if: steps.changed-i18n-files.outputs.any_changed == 'true' | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{ needs.get-flutter-version.outputs.flutter-version }} | |
cache: true | |
- name: Get dependencies | |
if: steps.changed-i18n-files.outputs.any_changed == 'true' | |
run: flutter pub get | |
- name: Sort i18n files | |
if: steps.changed-i18n-files.outputs.any_changed == 'true' | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-i18n-files.outputs.all_changed_files }} | |
run: | | |
for file in $ALL_CHANGED_FILES; do | |
dart run script/sort_yaml.dart $file | |
done | |
- name: Suggest changes | |
if: github.event_name == 'pull_request' | |
uses: reviewdog/action-suggester@v1 | |
with: | |
fail_on_error: true | |
- name: Check diff | |
if: github.event_name != 'pull_request' | |
run: git diff --exit-code | |
check-build-diff: | |
runs-on: ubuntu-latest | |
needs: get-flutter-version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
flutter-version: ${{ needs.get-flutter-version.outputs.flutter-version }} | |
cache: true | |
- name: Run build_runner | |
run: dart run build_runner build -d | |
- name: Suggest changes | |
if: github.event_name == 'pull_request' | |
uses: reviewdog/action-suggester@v1 | |
with: | |
fail_on_error: true | |
- name: Check diff | |
if: github.event_name != 'pull_request' | |
run: git diff --exit-code |