Skip to content

feat: 0.8.0 - Federated architecture migration with community bugfixes #227

feat: 0.8.0 - Federated architecture migration with community bugfixes

feat: 0.8.0 - Federated architecture migration with community bugfixes #227

Workflow file for this run

name: test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap packages
run: melos bootstrap
- name: Test
run: |
cd workmanager
flutter test
native_ios_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap packages
run: melos bootstrap
- name: Build iOS App
run: cd example && flutter build ios --debug --no-codesign
- name: Run native iOS tests
run: cd example/ios && xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' test
native_android_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap packages
run: melos bootstrap
- name: Build Android App
run: cd example && flutter build apk --debug
- name: Run native Android tests
run: cd example/android && ./gradlew :workmanager:test
drive_ios:
strategy:
matrix:
device:
- "iPhone 15 Pro"
fail-fast: false
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- uses: futureware-tech/simulator-action@v3
with:
model: '${{ matrix.device }}'
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap packages
run: melos bootstrap
# Run flutter integrate tests
- name: Run Flutter integration tests
run: cd example && flutter test integration_test/workmanager_integration_test.dart
drive_android:
runs-on: ubuntu-latest
#creates a build matrix for your jobs
strategy:
#set of different configurations of the virtual environment.
matrix:
api-level: [34]
# api-level: [21, 29]
target: [default]
steps:
- uses: actions/checkout@v4
- name: Enable KVM
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
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap packages
run: melos bootstrap
- name: Run Flutter Driver tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
disk-size: 6000M
heap-size: 600M
script: cd example && flutter test integration_test/workmanager_integration_test.dart