Skip to content

Session/8

Session/8 #21

Workflow file for this run

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
# https://github.com/subosito/flutter-action
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
cache-key: ${{ env.FLUTTER_VERSION }}-${{ env.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'