This repository has been archived on 2023-09-08. You can view files and clone it, but cannot push or open issues or pull requests.
moxplatform/.github/workflows/my_plugin.yaml

182 lines
4.2 KiB
YAML
Raw Normal View History

2022-02-24 21:52:57 +00:00
name: my_plugin
on:
pull_request:
paths:
- ".github/workflows/my_plugin.yaml"
- "src/my_plugin/**"
push:
branches:
- main
paths:
- ".github/workflows/my_plugin.yaml"
- "src/my_plugin/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/my_plugin
2022-02-28 18:02:46 +00:00
2022-02-28 21:36:56 +00:00
android:
runs-on: macos-10.15
2022-02-28 18:02:46 +00:00
defaults:
run:
working-directory: src/my_plugin/example
steps:
- uses: actions/checkout@v2
2022-02-28 21:36:56 +00:00
- uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "11"
2022-02-28 18:02:46 +00:00
- uses: subosito/flutter-action@v2
2022-02-28 21:36:56 +00:00
- name: Flutter Doctor
run: flutter doctor -v
2022-02-28 18:02:46 +00:00
2022-02-28 21:36:56 +00:00
- 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/my_plugin/example
ios:
runs-on: macos-10.15
defaults:
run:
working-directory: src/my_plugin/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
2022-02-28 18:02:46 +00:00
- name: Flutter Doctor
run: flutter doctor -v
2022-02-28 21:36:56 +00:00
- name: Start Simulator
run: open -a Simulator.app
2022-02-28 18:02:46 +00:00
- name: Integration Tests
2022-02-28 21:36:56 +00:00
run: flutter test integration_test -d iPhone
2022-02-28 18:02:46 +00:00
2022-02-28 21:36:56 +00:00
linux:
runs-on: ubuntu-18.04
2022-02-28 18:02:46 +00:00
defaults:
run:
working-directory: src/my_plugin/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
2022-02-28 21:36:56 +00:00
- 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
2022-02-28 18:02:46 +00:00
- name: Enable desktop support
2022-02-28 21:36:56 +00:00
run: flutter config --enable-linux-desktop
2022-02-28 18:02:46 +00:00
- name: Flutter Doctor
run: flutter doctor -v
- name: Integration Tests
2022-02-28 21:36:56 +00:00
run: xvfb-run flutter test integration_test -d linux
2022-02-28 18:02:46 +00:00
macos:
runs-on: macos-10.15
defaults:
run:
working-directory: src/my_plugin/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
2022-02-28 21:36:56 +00:00
web:
2022-02-28 18:02:46 +00:00
runs-on: macos-10.15
defaults:
run:
working-directory: src/my_plugin/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
- name: Flutter Doctor
run: flutter doctor -v
2022-02-28 21:36:56 +00:00
- 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 &
2022-02-28 18:02:46 +00:00
- name: Integration Tests
2022-02-28 21:36:56 +00:00
run: flutter drive --driver test_driver/integration_test.dart --target integration_test/app_test.dart -d web-server --browser-name=chrome
2022-02-28 18:02:46 +00:00
2022-02-28 21:36:56 +00:00
windows:
runs-on: windows-2019
2022-02-28 18:02:46 +00:00
defaults:
run:
working-directory: src/my_plugin/example
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
2022-02-28 21:36:56 +00:00
- name: Enable desktop support
run: flutter config --enable-windows-desktop
2022-02-28 18:02:46 +00:00
2022-02-28 21:36:56 +00:00
- name: Flutter Doctor
run: flutter doctor -v
2022-02-28 18:02:46 +00:00
- name: Integration Tests
2022-02-28 21:36:56 +00:00
run: flutter test integration_test -d windows