Skip to content

refactor: rename state classes for consistency #168

refactor: rename state classes for consistency

refactor: rename state classes for consistency #168

name: Integration_tests
on:
push:
branches: [master, testing-ffi]
paths:
- "**"
- "!README.md"
pull_request:
branches: [master]
paths:
- "**"
- "!README.md"
concurrency:
group: auto-deploy-integration-tests
cancel-in-progress: true
jobs:
android_test:
name: Android_test
# runs-on: macos-latest
runs-on: ubuntu-latest
strategy:
matrix:
# api-level: [21, 23, 24, 26, 28, 29]
api-level: [33]
# target: [google_apis]
target: [default]
steps:
# Following https://github.com/cyface-de/android-backend/blob/main/.github/workflows/gradle_connected-tests.yml to fix emualtor not working sometimes
# # From https://github.com/android/nowinandroid/pull/1219/files to fix flaky emulator start
# # See https://github.com/ReactiveCircus/android-emulator-runner/issues/324#issuecomment-1998737488
# - name: Delete unnecessary tools 🔧
# uses: jlumbroso/free-disk-space@v1.3.1
# with:
# android: false # Keep Don't remove Android tools
# tool-cache: true # Remove image tool cache - rm -rf "$AGENT_TOOLSDIRECTORY"
# dotnet: true # rm -rf /usr/share/dotnet
# haskell: true # rm -rf /opt/ghc...
# swap-storage: true # rm -f /mnt/swapfile (4GiB)
# docker-images: false # Takes 16s (`nowinandroid`), enable if needed in the future
# large-packages: false # includes google-cloud-sdk and it's slow
# Set up KVM permissions to enable efficient Android emulator runs by modifying udev rules for universal access.
# From https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml#L142
- 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
- uses: actions/checkout@v4
with:
submodules: "true"
- uses: actions/setup-java@v4
with:
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
# cache: true
- run: flutter pub get
- name: Run integration tests
uses: reactivecircus/android-emulator-runner@v2
with:
target: ${{ matrix.target }}
api-level: ${{ matrix.api-level }}
arch: x86_64
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
profile: Nexus 6
disk-size: 6000M
heap-size: 600M
disable-animations: true
script: cd example && echo "ls assets contents" && ls assets && echo "ls contents" && ls && flutter pub get && flutter test integration_test
ios_test:
name: iOS_test
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "true"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- uses: futureware-tech/simulator-action@v3
with:
os: "iOS"
- run: flutter pub get
- name: Run integration tests
run: cd example && flutter test integration_test