update flutter (3.22.2 -> 3.22.3) #85
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: Jasstafel CI | |
on: | |
push: | |
branches: | |
- "**" | |
# cspell:disable | |
jobs: | |
test-android: | |
if: ${{ !contains(github.ref, 'ios') }} | |
strategy: | |
matrix: | |
device: | |
- "pixel_6" | |
- "10.1in WXGA (Tablet)" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Enable KVM group perms | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
ls /dev/kvm | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out submodule | |
run: git submodule update --init --force | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: "17.x" | |
cache: "gradle" | |
- name: Get dependencies | |
run: flutter/bin/flutter pub get | |
- name: Generate icons | |
run: flutter/bin/flutter pub run flutter_launcher_icons | |
- name: Generate translations | |
run: flutter/bin/flutter gen-l10n | |
- name: Generate sources | |
run: flutter/bin/flutter packages pub run build_runner build --delete-conflicting-outputs | |
- name: Test | |
run: flutter/bin/flutter test | |
- name: Integration test | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
arch: x86_64 | |
disable-animations: true | |
disk-size: 6000M | |
heap-size: 600M | |
profile: ${{ matrix.device }} | |
script: | | |
flutter/bin/flutter test integration_test | |
sed -i -e 's/driverTest = false/driverTest = true/g' integration_test/screenshot_test.dart | |
flutter/bin/flutter drive --driver=screenshot_test/driver.dart --target=integration_test/screenshot_test.dart | |
- name: screenshot artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshots_android_${{ matrix.device }} | |
path: screenshots/* | |
test-ios: | |
if: ${{ !contains(github.ref, 'android') }} | |
strategy: | |
matrix: | |
device: | |
- "iPhone 15 Pro Max Simulator" | |
- "iPhone SE" | |
- "iPad Pro (12.9-inch)" | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Check out submodule | |
run: git submodule update --init --force | |
- name: Setup xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: "15.3.0" | |
- name: "List all simulators" | |
run: "xcrun xctrace list devices" | |
- name: "Start Simulator" | |
run: | | |
UDID=$(xcrun xctrace list devices | grep -m 1 "^${{ matrix.device }}" | awk '{gsub(/[()]/,""); print $NF}') | |
xcrun simctl boot "${UDID:?No Simulator with this name found}" | |
- name: Get dependencies | |
run: flutter/bin/flutter pub get | |
- name: Generate icons | |
run: flutter/bin/flutter pub run flutter_launcher_icons | |
- name: Generate translations | |
run: flutter/bin/flutter gen-l10n | |
- name: Generate sources | |
run: flutter/bin/flutter packages pub run build_runner build --delete-conflicting-outputs | |
- name: Test | |
run: flutter/bin/flutter test | |
- name: Integration test | |
run: flutter/bin/flutter test integration_test | |
- name: Take screenshots | |
run: | | |
sed -i '' -e 's/driverTest = false/driverTest = true/g' integration_test/screenshot_test.dart | |
flutter/bin/flutter drive --no-enable-impeller --driver=screenshot_test/driver.dart --target=integration_test/screenshot_test.dart | |
- name: Screenshot artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshots_ios_${{ matrix.device }} | |
path: screenshots/* |