This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
update workflow #67
Workflow file for this run
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: check-pr | |
on: | |
pull_request: | |
jobs: | |
check: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
# https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# https://github.com/kuhnroyal/flutter-fvm-config-action | |
- name: Fetch flutter config | |
uses: kuhnroyal/flutter-fvm-config-action@v1 | |
id: fvm-config-action | |
# https://github.com/subosito/flutter-action | |
- name: Setup flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
cache: true | |
cache-key: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}-${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
# https://github.com/actions/cache | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ env.PUB_CACHE }} | |
${{ github.workspace }}/.packages | |
${{ github.workspace }}/.flutter-plugins | |
${{ github.workspace }}/.flutter-plugin-dependencies | |
${{ github.workspace }}/.dart_tool/package_config.json | |
key: build-pubspec-${{ hashFiles(format('{0}{1}', github.workspace, '/pubspec.lock')) }} | |
restore-keys: | | |
build-pubspec- | |
- name: Install dependencies | |
run: flutter pub get | |
# https://github.com/blendthink/elixir | |
- name: Report analyze | |
uses: blendthink/elixir@v2 | |
- name: Run test | |
run: flutter test --no-pub --machine > test_report.log | |
continue-on-error: true | |
# https://github.com/dorny/test-reporter | |
- name: Report test | |
uses: dorny/test-reporter@v1 | |
with: | |
name: 'flutter test' | |
path: 'test_report.log' | |
reporter: 'flutter-json' | |
fail-on-error: 'true' |