This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (65 loc) · 2.08 KB
/
integration-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Integration tests
on:
# Trigger the workflow on pushes to the main and feature branches.
push:
branches: [main, feature/**]
pull_request:
branches: [main, feature/**]
# Allows us to run the workflow manually from the Actions tab
workflow_dispatch:
env:
flutter_version: 3.13.6
iphone_model: iPhone 8
android_profile: Nexus 6
android_api_level: 32
android_target: google_apis
jobs:
android-integration-tests:
# It should be most efficient to use the macOS because of hardware acceleration available here.
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
cache: true
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
# Run integration test with android emulator
- name: Run Flutter integration tests
uses: reactivecircus/android-emulator-runner@v2
with:
target: ${{ env.android_target }}
api-level: ${{ env.android_api_level }}
arch: x86_64
profile: ${{ env.android_profile }}
script: flutter test integration_test/
iOS-integration-tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
cache: true
# Start iOS simulator
- uses: futureware-tech/simulator-action@v3
with:
model: ${{ env.iphone_model }}
# Run integration test
- run: flutter test integration_test/
web-integration-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: 'stable'
cache: true
- uses: nanasess/setup-chromedriver@v2
- run: chromedriver --port=4444 & ./integration_test/run_web_tests.sh