Skip to content

a-mabe is building and testing OpenHIIT #116

a-mabe is building and testing OpenHIIT

a-mabe is building and testing OpenHIIT #116

name: Build and Run Integration Tests
run-name: ${{ github.actor }} is building and testing OpenHIIT
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- 'main'
- 'pre-release'
paths:
- 'lib/**'
- 'test_driver/**'
- 'integration_test/**'
- 'pubspec.yaml'
- 'pubspec.lock'
- 'android/**'
- 'ios/**'
jobs:
Workout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Check Version
run: flutter --version
- name: Flutter Doctor
run: flutter doctor -v
- 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
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
arch: x86_64
profile: pixel_6_pro
script: |
flutter build apk --target integration_test/workout_test.dart --debug
adb -s emulator-5554 install build/app/outputs/flutter-apk/app-debug.apk
adb -s emulator-5554 root
adb -s emulator-5554 shell appops set com.codepup.workout_timer SCHEDULE_EXACT_ALARM allow
flutter drive -d emulator-5554 --driver=test_driver/integration_test.dart --use-application-binary=build/app/outputs/flutter-apk/app-debug.apk
Timer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Check Version
run: flutter --version
- name: Flutter Doctor
run: flutter doctor -v
- 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
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
arch: x86_64
profile: pixel_6_pro
script: |
flutter build apk --target integration_test/timer_test.dart --debug
adb -s emulator-5554 install build/app/outputs/flutter-apk/app-debug.apk
adb -s emulator-5554 root
adb -s emulator-5554 shell appops set com.codepup.workout_timer SCHEDULE_EXACT_ALARM allow
flutter drive -d emulator-5554 --driver=test_driver/integration_test.dart --use-application-binary=build/app/outputs/flutter-apk/app-debug.apk
General:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Check Version
run: flutter --version
- name: Flutter Doctor
run: flutter doctor -v
- 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
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 35
arch: x86_64
profile: pixel_6_pro
script: |
flutter build apk --target integration_test/general_test.dart --debug
adb -s emulator-5554 install build/app/outputs/flutter-apk/app-debug.apk
adb -s emulator-5554 root
adb -s emulator-5554 shell appops set com.codepup.workout_timer SCHEDULE_EXACT_ALARM allow
flutter drive -d emulator-5554 --driver=test_driver/integration_test.dart --use-application-binary=build/app/outputs/flutter-apk/app-debug.apk