Skip to content

Commit cb481e0

Browse files
test: separate out e2e test workflows (#13304)
1 parent 915a332 commit cb481e0

File tree

6 files changed

+552
-457
lines changed

6 files changed

+552
-457
lines changed

.github/workflows/android.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: e2e-android
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
paths-ignore:
10+
- 'docs/**'
11+
- 'website/**'
12+
- '**/example/**'
13+
- '**/flutterfire_ui/**'
14+
- '**.md'
15+
push:
16+
branches:
17+
- main
18+
paths-ignore:
19+
- 'docs/**'
20+
- 'website/**'
21+
- '**/example/**'
22+
- '**/flutterfire_ui/**'
23+
- '**.md'
24+
25+
jobs:
26+
android:
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 45
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
working_directory:
33+
['tests', 'packages/cloud_firestore/cloud_firestore/example']
34+
steps:
35+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
36+
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
37+
name: Install Node.js 20
38+
with:
39+
node-version: '20'
40+
- uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
41+
with:
42+
distribution: 'temurin'
43+
java-version: '17'
44+
- name: Firebase Emulator Cache
45+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
46+
with:
47+
path: ~/.cache/firebase/emulators
48+
key: firebase-emulators-v3-${{ github.run_id }}
49+
restore-keys: firebase-emulators-v3
50+
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
51+
with:
52+
channel: 'stable'
53+
cache: true
54+
- uses: bluefireteam/melos-action@7e70fbe34bbd91a75eb505eeb4174b0ac9a1df52
55+
with:
56+
run-bootstrap: false
57+
melos-version: '5.3.0'
58+
- name: 'Bootstrap package'
59+
run: melos bootstrap --scope tests && melos bootstrap --scope "cloud_firestore*"
60+
- name: 'Install Tools'
61+
run: |
62+
sudo npm i -g firebase-tools
63+
- name: Start Firebase Emulator
64+
run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
65+
- name: Enable KVM
66+
run: |
67+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
68+
sudo udevadm control --reload-rules
69+
sudo udevadm trigger --name-match=kvm
70+
- name: Gradle cache
71+
uses: gradle/actions/setup-gradle@v4
72+
- name: AVD cache
73+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
74+
id: avd-cache
75+
with:
76+
path: |
77+
~/.android/avd/*
78+
~/.android/adb*
79+
key: avd-ubuntu
80+
- name: Start AVD then run E2E tests
81+
uses: reactivecircus/android-emulator-runner@v2
82+
with:
83+
api-level: 34
84+
target: google_apis
85+
arch: x86_64
86+
working-directory: ${{ matrix.working_directory }}
87+
script: |
88+
flutter test integration_test/e2e_test.dart --dart-define=CI=true -d emulator-5554

0 commit comments

Comments
 (0)