46c8c38aa7
Test / test (push) Successful in 7m35s
Signed-off-by: Peter Siegmund <developer@mars3142.org>
182 lines
4.4 KiB
YAML
182 lines
4.4 KiB
YAML
name: toaster_utils
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/toaster_utils.yaml"
|
|
- "toaster_utils/**"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ".github/workflows/toaster_utils.yaml"
|
|
- "toaster_utils/**"
|
|
|
|
jobs:
|
|
spell-check:
|
|
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
|
|
with:
|
|
includes: |
|
|
**/*.md
|
|
!brick/**/*.md
|
|
.*/**/*.md
|
|
modified_files_only: false
|
|
|
|
build:
|
|
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
|
|
with:
|
|
flutter_version: 3.41.1
|
|
working_directory: toaster_utils
|
|
|
|
|
|
android:
|
|
runs-on: macos-latest
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: toaster_utils/example
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v3
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: "11"
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
- name: Install Fluttium
|
|
run: flutter pub global activate fluttium_cli
|
|
|
|
- name: AVD Cache
|
|
uses: actions/cache@v3
|
|
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: E2E Tests
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: 29
|
|
script: fluttium test flows/test_platform_name.yaml -d android
|
|
working-directory: toaster_utils/example
|
|
|
|
ios:
|
|
runs-on: macos-latest
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: toaster_utils/example
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
- name: Install Fluttium
|
|
run: flutter pub global activate fluttium_cli
|
|
|
|
- name: Start Simulator
|
|
# Start an iPhone simulator
|
|
run: |
|
|
UDID=$(xcrun xctrace list devices | grep "^iPhone" | awk '{gsub(/[()]/,""); print $NF}' | head -n 1)
|
|
echo $UDID
|
|
xcrun simctl boot "${UDID:?No Simulator with this name found}"
|
|
|
|
- name: E2E Tests
|
|
run: fluttium test flows/test_platform_name.yaml -d iPhone
|
|
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
if: false # todo(renancaraujo): https://github.com/wolfenrain/fluttium/issues/345
|
|
defaults:
|
|
run:
|
|
working-directory: toaster_utils/example
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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: Install Fluttium
|
|
run: flutter pub global activate fluttium_cli
|
|
|
|
- name: E2E Tests
|
|
run: xvfb-run fluttium test flows/test_platform_name.yaml -d linux
|
|
|
|
macos:
|
|
runs-on: macos-13
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: toaster_utils/example
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
- name: Install Fluttium
|
|
run: flutter pub global activate fluttium_cli
|
|
|
|
- name: E2E Tests
|
|
run: fluttium test flows/test_platform_name.yaml -d macos
|
|
|
|
web:
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: toaster_utils/example
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
- name: Install Fluttium
|
|
run: flutter pub global activate fluttium_cli
|
|
|
|
- name: E2E Tests
|
|
run: xvfb-run fluttium test flows/test_platform_name.yaml -d chrome
|
|
|
|
windows:
|
|
runs-on: windows-2019
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: toaster_utils/example
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
- name: Install Fluttium
|
|
run: flutter pub global activate fluttium_cli
|
|
|
|
- name: E2E Tests
|
|
run: fluttium test flows/test_platform_name.yaml -d windows
|