Skip to content

Version 1.0.0

Version 1.0.0 #1

name: flutter_document_scanner
on:
pull_request:
paths:
- ".github/workflows/flutter_document_scanner.yaml"
- "src/flutter_document_scanner/**"
push:
branches:
- main
paths:
- ".github/workflows/flutter_document_scanner.yaml"
- "src/flutter_document_scanner/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 3.0.0
working_directory: src/flutter_document_scanner
android:
runs-on: macos-latest
defaults:
run:
working-directory: src/flutter_document_scanner/example
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "11"
- uses: subosito/flutter-action@v2
- name: Flutter Doctor
run: flutter doctor -v
- name: AVD Cache
uses: actions/cache@v2
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-29
- name: Cache AVD Snapshot
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Integration Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: flutter test integration_test
working-directory: src/flutter_document_scanner/example
ios:
runs-on: macos-latest
defaults:
run:
working-directory: src/flutter_document_scanner/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
- name: Flutter Doctor
run: flutter doctor -v
- name: Start Simulator
run: open -a Simulator.app
- name: Integration Tests
run: flutter test integration_test -d iPhone
linux:
runs-on: ubuntu-18.04
defaults:
run:
working-directory: src/flutter_document_scanner/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev liblzma-dev
- name: Enable desktop support
run: flutter config --enable-linux-desktop
- name: Flutter Doctor
run: flutter doctor -v
- name: Integration Tests
run: xvfb-run flutter test integration_test -d linux
macos:
runs-on: macos-latest
defaults:
run:
working-directory: src/flutter_document_scanner/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
- name: Enable desktop support
run: flutter config --enable-macos-desktop
- name: Flutter Doctor
run: flutter doctor -v
- name: Integration Tests
run: flutter test integration_test -d macos
web:
runs-on: macos-latest
defaults:
run:
working-directory: src/flutter_document_scanner/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
- name: Flutter Doctor
run: flutter doctor -v
- name: Run Chromedriver
run: |
git clone https://github.com/felangel/web_installers
cd web_installers/packages/web_drivers
dart pub get
dart lib/web_driver_installer.dart chromedriver --install-only
./chromedriver/chromedriver --port=4444 &
- name: Integration Tests
run: flutter drive --driver test_driver/integration_test.dart --target integration_test/app_test.dart -d web-server --browser-name=chrome
windows:
runs-on: windows-2019
defaults:
run:
working-directory: src/flutter_document_scanner/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
- name: Enable desktop support
run: flutter config --enable-windows-desktop
- name: Flutter Doctor
run: flutter doctor -v
- name: Integration Tests
run: flutter test integration_test -d windows