Skip to content

Commit

Permalink
run android integration tests in gitlab action
Browse files Browse the repository at this point in the history
  • Loading branch information
simonste committed May 28, 2024
1 parent 7bf83ea commit 9878c5b
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ jobs:
strategy:
matrix:
device:
- "Nexus 6"
runs-on: macos-latest
- "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
Expand All @@ -36,22 +44,20 @@ jobs:

- name: Test
run: flutter/bin/flutter test
# - name: Integration test
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 29
# profile: ${{ matrix.device }}
# script: flutter/bin/flutter test integration_test

- name: Take screenshots
if: ${{ false }}
- 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:
Expand Down

0 comments on commit 9878c5b

Please sign in to comment.